4 ms·
https://html.spec.whatwg.org/multipage/syntax.html#optional-tags https://html.spec.whatwg.org/multipage/syntax.html#optional-... describes which elements have o
by chrismorgan 6y ago
https://html.spec.whatwg.org/multipage/syntax.html#optional-tags https://html.spec.whatwg.org/multipage/syntax.html#optional-... describes which elements have optional start and end tags.
This document is valid:
<!doctype html>
<title>Hello,</title>
<p>World!
<ul>
<li>A
<li>B
</ul>
<table>
<tr>
<th>C
<td>D
<td>E
<tfoot>
<tr>
<th>F
<td>G
<td>H
</table>
And is precisely equivalent to this document in the canonical serialisation:
<!DOCTYPE html><html><head><title>Hello,</title>
</head><body><p>World!
</p><ul>
<li>A
</li><li>B
</li></ul>
<table>
<tbody><tr>
<th>C
</th><td>D
</td><td>E
</td></tr></tbody><tfoot>
<tr>
<th>F
</th><td>G
</th><td>H
</td></tr></tfoot></table></body></html>