Tagg the Builder saysHTML5 is forgiving; XHTML is HTML written under strict XML rules. HTML5 won, but the discipline still teaches good habits.
XHTML reformulated HTML as strict XML: every tag lowercase, every tag closed (even <br />), every attribute quoted, perfect nesting. A single error meant the whole page refused to render.
HTML5 chose pragmatism — browsers recover from mistakes — and that's why it won. But writing HTML as if it were XHTML (closing tags, quoting attributes) gives you cleaner, more predictable markup. Take the discipline, skip the brittleness.
Power-ups you unlock
XHTML = HTML under strict XML rules
One error in XHTML breaks the whole page
HTML5 recovers from mistakes — so it won
Borrow XHTML habits: close tags, quote attributes, nest cleanly
The Unclosed Tag attacks — common mistakes
Believing you must self-close void tags in HTML5 (optional)
Treating HTML5 leniency as license for sloppy markup
Serving XHTML with the wrong MIME type and losing strictness anyway
Boss battleWrite the same small snippet twice — once HTML5-loose, once XHTML-strict (lowercase, quoted, self-closed) — and compare.
Example code
<!doctype html>
<html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;font-size:13px">
<p>html5 loose: <IMG SRC=pic.png><BR></p>
<p>xhtml strict: <img src="pic.png" /><br /></p>
<p style="color:#8aff9d">write the strict version by habit — it is cleaner.</p>
</body></html>