All Browsers

Valid XHTML 1.1!

Valid CSS!


常用的HTML標籤

網頁架構和說明的標籤
<html> … </html>指示文件的開始和結尾
<head> … </head>給瀏覽器用的資訊,但不顯示於瀏覽器上
<title> … </title>網頁文件的標題
<meta …>供給瀏覽器所需的資訊
<body> … </body>網頁包含的內容
 ╭<html>
 ︱  ╭<head>
 ︱  ︱<title>Title put here</title>
 ︱ 頭︱<meta http-equiv="Content-Type"
文︱  ︱ content="text/html; charset=big5">
件︱  ╰</head> (↑此meta說明此為繁體中文網頁↑)
檔︱ 正╭<body>
 ︱ 文︱The content of your page
 ︱  ╰</body>
 ╰</html>
文字外觀的標籤
<b> … </b>使文字變為粗體
<b>This is bold text</b>
<font …> … </font>設定文字的顏色、大小、字型等
<font color="red" size="-1">Red text, smaller size</font>
<font face="Comic Sans MS">Comic Sans MS</font>
<h1> … </h1>建立標題文字 (字型由h1至h6)

<h4>This is H4 header</h4>

<i> … </i>使文字變為斜體
<i>This is italic text</i>
<span …> … </span>設定文字的顏色、大小、字型等 (詳情請參閱CSS資料)
<span style="background-color:yellow;">Text with yellow background</span>
<sub> … </sub>在文字轉成下標
H<sub>2</sub>O
<sup> … </sup>在文字轉成上標
x<sup>2</sup> - 4 = 0
<u> … </u>在文字底下畫線
<u>This is underline text</u>
控制元素位置的標籤
<blockquote> … </blockquote>文字縮排
First Paragraph
<blockquote>Indented text</blockquote>
Third Paragraph
<br>文字分行
First Line<br>
Second Line
<div …> … </div>文字對齊
<div align="left">Left</div>
<div align="center">Center</div>
<div align="right">Right</div>
<p> … </p>文字分段

<p>First paragraph with long long long long long long text</p>

<p>Second Paragraph with long long long long long long text</p>

超連結、圖像、水平線的標籤
<a …>建立超連結
<a href="index.php">My Index</a>
<a href="http://www.info.gov.hk/">HKSAR Web</a>
<a href="mailto:abc@def.com.hk">E-mail Link</a>
<hr>建立水平線

<img …>展示圖像
<img src="image.png">
建立列表的標籤
<ol>
<li>…
<li>…
</ol>
建立編號列表
  1. Point one
  2. Point two
<ul>
<li>…
<li>…
</ul>
建立項目列表
  • Point one
  • Point two
設定表格的標籤
<table> … </table>建立表格
<tr> … </tr>在<table> … </table>中建立橫列
<td> … </td>在<tr> … </tr>中建立儲存格
 ╭<table>
 ︱  ╭<tr>
 ︱ 第︱ <td>資料格一</td>
表︱ 一︱ <td>資料格二</td>
 ︱ 行︱ <td>資料格三</td>
 ︱  ╰</tr>
 ︱  ╭<tr>
 ︱ 第︱ <td>資料格一</td>
格︱ 二︱ <td>資料格二</td>
 ︱ 行︱ <td>資料格三</td>
 ︱ ╰</tr>
 ╰</table>
特殊符號
&amp;& 符號
&gt;> 符號
&lt;< 符號
&nbsp;不換行空格
&quot;" 雙引號
&#177;± 加減號
&#215;× 乘號
&#247;÷ 除號
&copy;© 版權符號
&reg;® 註冊符號
&#8596;↔ 左右箭號
&cent;¢ 百分一元符號
&euro;€ 歐元符號
&pound;£ 英鎊符號
&yen;¥ 人民幣/日元符號

[返回主網頁] [易於列印版本] [Larger] [Medium] [Smaller] [繁體中文] [简体中文]
© 1997-2010 My Email 修改日期:5 December 2003.