學(xué)了一些基本的HTML 4的標(biāo)簽栓拜,做一個(gè)總結(jié)座泳。雖然只列舉了一些,不全面幕与,但是很常用钳榨。
HTML 基本文檔
<!DOCTYPE html>
<html>
<head>
<title>文檔標(biāo)題</title>
</head>
<body>
可見文本...
</body>
</html>
1.基本標(biāo)簽(Basic Tags)
<h1>最大的標(biāo)題</h1>
<h2> . . . </h2>
<h3> . . . </h3>
<h4> . . . </h4>
<h5> . . . </h5>
<h6>最小的標(biāo)題</h>
<p>這是一個(gè)段落。</p>
2.換行標(biāo)簽(br)
3.水平線標(biāo)簽( hr)
4.文本格式化(Formatting)
<b>粗體文本</b>
<code>計(jì)算機(jī)代碼</code>
<em>強(qiáng)調(diào)文本</em>
<i>斜體文本</i>
<kbd>鍵盤輸入</kbd>
<pre>預(yù)格式化文本</pre>
<small>更小的文本,縮小字體</small>
<strong>重要的文本纽门,字體加粗</strong>
5.其他標(biāo)簽
<abbr> (縮寫)
<address> (聯(lián)系信息)
<bdo> (文字方向)
<blockquote> (從另一個(gè)源引用的部分)
<cite> (工作的名稱)
<del> (刪除的文本)
<ins> (插入的文本)
(sub)下標(biāo)文本
(sup)上標(biāo)文本
6.鏈接(Links)
普通的鏈接:<a >鏈接文本</a>
圖像鏈接: <a ><img src="URL" alt="替換文本"></a>
郵件鏈接: <a href="mailto:webmaster@example.com">發(fā)送e-mail</a>
書簽:<a id="tips">提示部分</a>
<a href="#tips">跳到提示部分</a>
7.引入圖片(Images)
<img src="URL" alt="替換文本" height="42" width="42">
8.樣式/區(qū)塊(Styles/Sections)
<style type="text/css">
h1 {color:red;}
p {color:blue;}
</style>
9.區(qū)塊元素
<div>文檔中的塊級(jí)元素</div>
<span>文檔中的內(nèi)聯(lián)元素</span>
10.無序列表
<ul>
<li>第一項(xiàng)</li>
<li>第二項(xiàng)</li>
</ul>
11.有序列表
<ol>
<li>第一項(xiàng)</li>
<li>第二項(xiàng)</li>
</ol>
12.定義列表
<dl>
<dt>項(xiàng)目 1</dt>
<dd>描述項(xiàng)目 1</dd>
<dt>項(xiàng)目 2</dt>
<dd>描述項(xiàng)目 2</dd>
</dl>
13.表格(Tables)
<tr>添加行 <td>添加單元格 <th>加粗字體
<table border="1">
<tr>
<th>表格標(biāo)題</th>
<th>表格標(biāo)題</th>
</tr>
<tr>
<td>表格數(shù)據(jù)</td>
<td>表格數(shù)據(jù)</td>
</tr>
</table>
14.框架(Iframe)
<iframe src="demo_iframe.htm"></iframe>
15.表單(Forms)
<form action="demo_form.php" method="post/get">
<input type="text" name="email" size="40" maxlength="50">文本字段
<input type="password">密碼域
<input type="checkbox" checked="checked">復(fù)選框
<input type="radio" checked="checked">單選按鈕
<input type="submit" value="Send">提交按鈕
<input type="button" value="Send">普通按鈕
<input type="reset">重置按鈕
<input type="hidden">隱藏域
</form>
16.<select>菜單列表類表單元素
內(nèi)容在表單內(nèi)部薛耻,可以選擇
<form>
<option>蘋果</option>
<option selected="selected">香蕉</option>
<option>櫻桃</option>
</select>
</form>
17.多行文本框
<textarea name="comment" rows="60" cols="20"></textarea>
18.字符實(shí)體(Entities)
(<);等同于 <
(>); 等同于 >
(©); 等同于 ?
注意:由于一些特殊的標(biāo)簽自動(dòng)轉(zhuǎn)換成其表示內(nèi)容,所以將< >用( )表示赏陵。字符實(shí)體中饼齿,分號(hào)緊連字符。