2 ms·
> you have to understand auto-closing behaviour either way You do, if you use HTML, but my read of the above two comments was that they would've preferred if t
by lucideer 6y ago
> you have to understand auto-closing behaviour either way
You do, if you use HTML, but my read of the above two comments was that they would've preferred if the world had stuck on the XHTML path.
> Now with XHTML, that's a different thing. But I think that ship sailed many years ago and HTML is a preferred way to go nowadays.
Actually, XHTML is a (little-known) part of the HTML5 spec.[0], so going the strict path is still an option. In the past, this would've required complex content-negotiation for media-type backward-compat but that's no longer an issue unless a non-neglible % of your visitors are using IE8.
The only remaining issue is that of draconian error handling, which is an issue browsers definitely would have fixed the UX of had the mainstream stayed on the XHTML track, but sadly that never happened. Still, good modern support for server-side validation of well-formed XML documents means this is also less of an issue than it once was (though tbh, still a significant issue imo).
W3 have also put together a more informal guide to modern XHTML considerations within the HTML5 spec. https://dev.w3.org/html5/html-polyglot/html-polyglot.html https://dev.w3.org/html5/html-polyglot/html-polyglot.html
[0] https://html.spec.whatwg.org/multipage/xhtml.html https://html.spec.whatwg.org/multipage/xhtml.html