html 常用語法


HTML 語法

由於常常忘東忘西 所以寫下這網頁 .如有錯誤請多多指教
姓名 姓名: <input type="txt" name="data1" size="10"/><br/>
解說 txt
圖例
姓名:


性別 性別: <input type="radio"  name="sex" value="male" checked="checked"/> 男性 <input type="radio" name="sex" value="female"/>女性<br/>
解說 radio 單選語法   checked="checked 預選 語法
圖例 性別: 男性 女性


語法
覆選a1 a2 a3 a4:
<input type="checkbox"  name="a" value="true" checked="checked"/>a1 <br/>
<input type="checkbox"  name="a" value="true"/>a2 <br/>
<input type="checkbox"  name="a" value="true"/>a3 <br/>
<input type="checkbox"  name="a" value="true"/>a4 <br/>
解說 checkbox 覆選語法  checked="checked 預選 語法
圖例 a1
a2
a3
a4


語法 <select name="s">
<option value="s1"> s1 </option>
<option value="s2" selected="selected"> s2  </option>
<option value="s3"> s3 </option>
<option value="s4"> s4 </option>
</select >
圖例

selected="selected 預設質

視窗型輸 入選擇


密碼
密碼: <input  type="password" name="pass1" size ="10"/><br/>
解說 password
圖例 密碼:



留言:<textarea name="message" row="20 cols=20>
</textarea>
圖例

<textarea  .....>
</textarea>



<input type="submit" value="確定送出" />
圖例



<input type="reset"  value="Rest"/>
圖例