HTML 4.01 速查表
速查表來自 W3Schools. 建議學習者將它印下,折起來並放進口袋中。
HTML 基本文件
<html>
<head>
<title>文件名稱</title>
</head>
<body>
給瀏覽器看文字部份
</body>
</html>
標題元素
<h1>最大的標題</h1>
<h2> . . . </h2>
<h3> . . . </h3>
<h4> . . . </h4>
<h5> . . . </h5>
<h6>最小的標題</h6>
文字元素
<p>段落 </p>
<br> 換行
<hr> 水平線
<pre>預置文字格式位置</pre>
邏輯類
<em>強調文字</em>
<strong>加強文字</strong>
<code>電腦編碼</code>
字體類
<b>粗體</b>
<i>斜體</i>
連結及圖片元素
<a href="http://www.w3schools.com/">這是連結</a>
<a href="http://www.w3schools.com/"><img src="URL" alt="轉換文字"></a>
<a href="mailto:someone@microsoft.com">傳送 e-mail</a>連結名稱:
<a name="tips">提示部份</a>
<a href="#tips">跳到提示部份</a>
無序排列
<ul>
<li>First item</li>
<li>Next item</li>
</ul>
有序排列
<ol>
<li>First item</li>
<li>Next item</li>
</ol>
特定排列
<dl>
<dt>First term</dt>
<dd>Definition</dd>
<dt>Next term</dt>
<dd>Definition</dd>
</dl>
表格
<table border="1">……表框
<tr>
<th>someheader</th>……表格標題
<th>someheader</th>
</tr>
<tr>
<td>sometext</td>
<td>sometext</td>
</tr>
</table>
框架
<frameset cols="25%,75%">; <frame src="page1.htm">
<frame src="page2.htm">
&</frameset>
文字型式與輸入
<form action="http://www.somewhere.com/somepage.asp" method="post/get">
<input type="text" name="lastname" value="Nixon" size="30" maxlength="50">
<input type="password">
<input type="checkbox" checked="checked">
<input type="radio" checked="checked">
<input type="submit">
<input type="reset">
<input type="hidden">
<select>
<option>Apples
<option selected>Bananas
<option>Cherries
</select>
<textarea name="Comment" rows="60" cols="20"></textarea>
</form>
字元實體
< is the same as <
> is the same as >
© is the same as ©
Other Elements
<!-- This is a comment -->
<blockquote>
Text quoted from some source.
</blockquote>
<address>
Address 1<br>
Address 2<br>
City<br>
</address>
Source : http://www.w3schools.com/html/html_quick.asp
|