3 ms·
My workaround for this is to write XHTML 5. Now, that standard AFAIK never materialized, but modern browsers will still happily use their XML parser if you serv
by El_RIDO 5y ago
My workaround for this is to write XHTML 5. Now, that standard AFAIK never materialized, but modern browsers will still happily use their XML parser if you serve the document as application/xhtml+xml instead of their default (slower) tag-soup parser to create a DOM-tree out of it and after that their HTML 5 support ensures that they render it correctly.
If and when browsers drop their XML parser, I hope they will just parse these docs as HTML and only then would I loose the option of self-closing tags.
- LinAGKar 5y agoIt didn't "never materialize". It's part of the HTML5 spec (although it's not called XHTML anymore, it's just HTML5 with XML syntax): https://html.spec.whatwg.org/#the-xhtml-syntax https://html.spec.whatwg.org/#the-xhtml-syntax