| 標籤 | 用途 | HTML5 新增/廢棄 |
|---|---|---|
<h1>-<h6> | 標題層級 | — |
<p> | 段落 | — |
<strong> | 重要/強調(粗體) | — |
<em> | 強調(斜體) | — |
<mark> | 標記/高亮 | HTML5 新增 |
<small> | 細則/側註 | 語意化調整 |
<del>/<ins> | 刪除/插入修訂 | — |
<abbr> | 縮寫(title 提示全寫) | — |
<cite> | 作品標題引用 | — |
<q>/<blockquote> | 行內/區塊引用 | — |
<code>/<pre> | 程式碼/預格式化 | — |
<time> | 機器可讀時間 | HTML5 新增 |
<b>/<i>/<u> | 純視覺粗/斜/底線 | 建議改用語意標籤 |
<img src="photo.webp" alt="描述" width="400" height="300" loading="lazy" decoding="async">
<picture>
<source type="image/avif" srcset="photo.avif">
<source type="image/webp" srcset="photo.webp">
<img src="photo.jpg" alt="fallback">
</picture>
<video controls preload="metadata" poster="cover.jpg">
<source src="video.mp4" type="video/mp4">
<track kind="subtitles" src="sub.vtt" srclang="zh" label="中文">
</video>
<audio controls><source src="audio.mp3" type="audio/mpeg"></audio>
<table>
<caption>月銷售報表</caption>
<thead><tr><th scope="col">月份</th><th scope="col">金額</th></tr></thead>
<tbody>
<tr><th scope="row">1月</th><td>$1,200</td></tr>
<tr><th scope="row">2月</th><td>$1,500</td></tr>
</tbody>
<tfoot><tr><th scope="row">總計</th><td>$2,700</td></tr></tfoot>
</table>
<form action="/api" method="post">
<label for="email">Email</label>
<input id="email" name="email" type="email" required autocomplete="email">
<fieldset>
<legend>偏好設定</legend>
<label><input type="checkbox" name="notify" value="email"> Email 通知</label>
</fieldset>
<button type="submit">送出</button>
</form>
<header>, <footer>, <main>, <nav>, <article>, <section>, <aside>, <figure>, <figcaption>, <details>, <summary>, <dialog><font>, <center>, <strike>, <big>, <tt>, <frame>, <frameset>, <noframes>, <acronym>, <applet>, <bgsound>, <marquee>, <blink>