3 ms·
> tbody is genuinely optional in the spec IIRC optional in the HTML spec only. Not in the XHMTL one and not in the polyglot syntax.
by TacticalCoder 5y ago
> tbody is genuinely optional in the spec
IIRC optional in the HTML spec only. Not in the XHMTL one and not in the polyglot syntax.
- chrismorgan 5y agoThe XHTML spec is obsolete and irrelevant. It’s replaced by the HTML spec using XML syntax. (W3C classes it as a Superseded Recommendation.) But tbody was optional even in XHTML 1.0 Strict; quoting https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd, <!ELEMENT table (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))> I’m pretty sure that this will be the reason it’s optional in the HTML spec, since there’d be no point in it being optional otherwise, since it’s not attainable in the HTML syntax.