freecoding.school100% FREE · NO SIGNUP
The Old NetISSUE #14 of 60

content-type · application/xhtml+xml

Pixel PeteVSQuirks Mode
Pixel Pete saysTrue XHTML is served as application/xhtml+xml — and that triggers strict XML parsing.

Here's the twist most people miss: an XHTML page served as text/html is parsed as HTML (lenient). Only application/xhtml+xml triggers the strict XML parser. So "XHTML" pages on the early web were usually just HTML in disguise — they never got the strictness they claimed, because changing the MIME type would have broken them.

Power-ups you unlock

Quirks Mode attacks — common mistakes

Boss battleExplain why an XHTML page served as text/html never got strict parsing.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>served as text/html          → parsed as HTML (lenient)
served as application/xhtml+xml → strict XML (one error fails)</pre></body></html>
▶ Open the interactive comic issue
‹ The Xhtml Namespace · XmlnsFatal Errors · Why Parsers Gave Up ›