HTML5では終了タグが不要なものがある。
【出現率の高いタグ】br、img、hr、meta、input
【出現率の低いタグ】embed、area、base、col、keygen、link、param、source
<br />→<br>のように使う。
以下のものも終了タグが不要だが、可読性の低下を招くため、閉じるようにする。特にテーブルタグ系は、ブラウザでtbodyが自動挿入されるため、しっかり閉じる事を忘れない。
li、dt、dd、p、tr、td、th、rt、rp、optgroup、option、thread、tfoot
<ul>
<li>テキスト1
<li>テキスト2
<li>テキスト3
</ul>
<table>
<thead>
<tr>
<th>項目タイトル
<th>項目タイトル
<th>項目タイトル
<tr>
<th colspan="3">項目タイトル
<tbody>
<tr>
<td>内容
<td>内容
<td>内容
<tfoot>
<tr>
<th colspan="3">内容
</table>
↓
<ul>
<li>テキスト1</li>
<li>テキスト2</li>
<li>テキスト3</li>
</ul>
<table>
<thead>
<tr>
<th>項目タイトル</th>
<th>項目タイトル</th>
<th>項目タイトル</th>
</tr>
<tr>
<th colspan="3">項目タイトル</th>
</tr>
</thead>
<tbody>
<tr>
<td>内容</td>
<td>内容</td>
<td>内容</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="3">内容</th>
</tr>
</tfoot>
</table>