超鏈接<a>
標(biāo)簽
-
href
鏈接地址,常見鏈接如下:-
http://baidu.com
網(wǎng)站鏈接 -
mailto:328664896@qq.com
郵件鏈接 -
/HTML文檔.html
文檔鏈接 -
tel:0512-XXXXX
電話鏈接
-
-
title
提示內(nèi)容 -
target
鏈接的文檔在何處顯示- 默認(rèn)在當(dāng)前頁面顯示
-
_blank
在新窗口顯示
標(biāo)題
<h1>
到<h6>
分別表示1到6號標(biāo)題
段落
段落由<p>
標(biāo)簽來表示
圖片
圖片由<img>
標(biāo)簽來表示御吞,常見屬性
-
src
圖片地址 -
alt
圖片加載失敗后顯示的文字
列表
有序列表由ol
表示酗电,子列表用li
無序列表由ul
表示,子列表用li
標(biāo)簽
標(biāo)簽由<label>
表示,常見屬性
for
表格
表格由<table>
表示撵术,如下
<table>
<thead>
<tr>
<th>國籍</th>
<th>省份</th>
</tr>
</thead>
<tbody>
<tr>
<td>中國</td>
<td>江蘇省</td>
</tr>
<td>美國</td>
<td>紐約</td>
<tr>
<!-- 跨兩列 -->
<td colspan="2"></td>
</tr>
<tr>
<!-- 跨兩行 -->
<td rowspan="2"></td>
</tr>
</tbody>
</table>
表單
- 文本框
<input type="text">
- 文本域
<textarea></textarea>
相較于文本框可以輸入更多內(nèi)容 - 單選框
<input type="radio" name="one">
- 復(fù)選框
<input type="checkbox" name="two">
- 下拉選擇框
<select>
<option value="1">蘋果</option>
<option value="2">香蕉</option>
</select>
- 數(shù)字框
<input type="number">
- 提交按鈕
<button type="submit">提交</button>
- 重置按鈕
<button type="reset"></button>
-
<datalist>
元素為<input>
元素規(guī)定預(yù)定義選項列表嫩与。
用戶會在他們輸入數(shù)據(jù)時看到預(yù)定義選項的下拉列表。
<input>
元素的 list 屬性必須引用<datalist>
元素的 id 屬性划滋。實(shí)例如:
<form action="action_page.php">
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
</form>
-
readonly
屬性規(guī)定輸入字段為只讀处坪。實(shí)例如下:
<form action="demo_form.asp" method="get">
Name: <input type="text" name="fullname" />
Country: <input type="text" name="country" value="China" readonly="readonly" />
<input type="submit" value="Submit" />
</form>
-
disabled
屬性規(guī)定禁用input
元素,被禁用的input
元素既不可用,也不可點(diǎn)擊同窘。 -
placeholder
屬性提供可描述輸入字段預(yù)期值的提示信息