Closed RinkeHoekstra closed 2 years ago
XHTML is deprecated, but HTML5 still has an XML syntax that can be used for more reliable parsing. https://html.spec.whatwg.org/#the-xhtml-syntax
It is not exactly clear why the standard settled on the XML syntax; most likely because content processing systems routinely manipulate the content using XML libraries. Enforcing an XML compatible serialization of the HTML prevents surprises.
@bkasdorf raised the issue with respect to the XHTML standard from 1999. Sadly, the XML serialization of HTML5 still relies on that namespace.
https://github.com/whatwg/html/blob/main/FAQ.md#what-is-the-namespace-declaration
HTML it is
XHTML is deprecated, but HTML5 still has an XML syntax that can be used for more reliable parsing. https://html.spec.whatwg.org/#the-xhtml-syntax
It is not exactly clear why the standard settled on the XML syntax; most likely because content processing systems routinely manipulate the content using XML libraries. Enforcing an XML compatible serialization of the HTML prevents surprises.