網頁架構和說明的標籤
<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說明此為繁體中文Big5碼網頁↑)檔︱ 正╭<body> ︱ 文︱The content of your page ︱ ╰</body> ╰</html>
文字外觀的標籤
<b> … </b>
<font …> … </font>
<h1> … </h1>
<i> … </i>
<span …> … </span>
<sub> … </sub>
<sup> … </sup>
<u> … </u>
使文字變為粗體
<b>This is bold text</b>
設定文字的顏色、大小、字型等
<font color="red" size="-1">Red text, smaller size</font>
<font face="Comic Sans MS">Comic Sans MS</font>
建立標題文字 (字型由h1至h6)
<h4>This is H4 header</h4>
使文字變為斜體
<i>This is italic text</i>
設定文字的顏色、大小、字型等 (詳情請參閱CSS資料)
<span style="background-color:yellow;">Text with yellow background</span>
在文字轉成下標
H<sub>2</sub>O
在文字轉成上標
x<sup>2</sup> - 4 = 0
在文字底下畫線
<u>This is underline text</u>
控制元素位置的標籤
<blockquote> … </blockquote>
<br>
<div …> … </div>
<p> … </p>
文字縮排
First Paragraph
<blockquote>Indented text</blockquote>
Third Paragraph
文字分行
First Line<br>
Second Line
文字對齊
<div align="left">Left</div>
<div align="center">Center</div>
<div align="right">Right</div>
文字分段
<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 …>
<hr>
<img …>
建立超連結
<a href="index.php">My Index</a>
<a href="http://www.gov.hk/">HKSAR Web</a>
<a href="mailto:abc@example.com">E-mail Link</a>
建立水平線
展示圖像
<img src="image.png">
建立列表的標籤
<ol>
<li>…
<li>…
</ol>
<ul>
<li>…
<li>…
</ul>
建立編號列表
Point one
Point two
建立項目列表
Point one
Point two
設定表格的標籤
<table> … </table>
<tr> … </tr>
<td> … </td>
建立表格
在<table> … </table>中建立橫列
在<tr> … </tr>中建立儲存格
╭<table> ︱ ╭<tr> ︱ 第︱ <td>資料格一</td> 表︱ 一︱ <td>資料格二</td> ︱ 行︱ <td>資料格三</td> ︱ ╰</tr> ︱ ╭<tr> ︱ 第︱ <td>資料格一</td> 格︱ 二︱ <td>資料格二</td> ︱ 行︱ <td>資料格三</td> ︱ ╰</tr> ╰</table>
特殊符號
&
>
<
"
±
×
÷
©
®
↔
¢
€
£
¥
& 符號
> 符號
< 符號
不換行空格
" 雙引號
± 加減號
× 乘號
÷ 除號
© 版權符號
® 註冊符號
↔ 左右箭號
¢ 百分一元符號
€ 歐元符號
£ 英鎊符號
¥ 人民幣/日元符號