3 ms·
The XHTML 2.0 "standard" was ditched on the web as no major browsers wanted to support it (and mostly still don't [1]). Also, most browsers today no longer sup
by WorldMaker 5y ago
The XHTML 2.0 "standard" was ditched on the web as no major browsers wanted to support it (and mostly still don't [1]).
Also, most browsers today no longer support XHTML 1.x "Strict" modes, the errors they surfaced, and instead just laxly parse all XHTML 1.x with the same parsers they use for "HTML5". (IE11 I believe was the last browser with XHTML "Strict" support and used a proper XML parser and error reporting when parsing XHTML.)
[1] Outside of how XHTML 2.0 influenced HTML5's list of "semantic DIVs" the tags like ARTICLE and SECTION that don't have any meaningful semantics in current browsers but are nice when you get bored of surrounding everything in DIV. XHTML 2.0's standard attached actual meanings to those tags and had a lot of specified behavior for how those tags would operate. The only surviving "tag behavior" from XHTML 2.0's plan was DETAILS, I believe. I also believe the exact lists of tags are disjoint and XHTML 2.0 had tags that didn't even make into the official "semantic DIV" bucket, are out of spec in HTML5, but HTML5 browsers will mostly just ignore and fallback to treating unknown tags as fallback DIVs anyway.
- vbezhenar 5y agoHere's example of invalid XHTML file with missing `</p>`: https://vbezhenar.com/test-invalid.xhtml https://vbezhenar.com/test-invalid.xhtml And fixed: https://vbezhenar.com/test-valid.xhtml https://vbezhenar.com/test-valid.xhtml It works in Chrome for me, parsing failed as expected on the invalid file. Also you can't use document.write from JS, so DOM has special treatment for XHTML as well.