Bruce Lawson's personal site

Goodbye XHTML 2

Sing with me! (Midi backing track):

Goodbye XHTML 2, though no-one ever used you at all
you had the grace to hold yourself
when all around you had a fighting chance of getting implemented.
And it seems to me that you lived your life pissing in the wind…

The W3C has pulled the plug on the XHTML 2 specification. This was a philosophically pure specification that was so backwardly incompatible that it nearly deprecated the img element. But this incompatibility, the draconian error handling that XML requires and the fact that XHTML 2 was for documents and ignored web applications doomed it to failure as a method for delivering content to browsers.

What does this mean to you?


Your current XHTML 1.x sites still continue working (except in IE, if you serve them as XML rather than HTML).

You wanna use XML? Then use XML. For those interested in HTML 5, I draw your attention to an article that I presciently wrote yesterday on XHTML 5, for those who worry unnecessarily that XML has been killed.

HTML 5 took some good ideas from XHTML 2 – the idea of deriving the “level” of a heading from its context, although it preserves using h1h6 for backwards compatibility rather than a generic h element. XHTML 2 allowed “href anywhere” so anything can be a link, and HTML 5 has a similar idea, although it preserves backwards compatibility by allowing the a element to surround block-level elements. The XHTML 2 element nl for navigation list is doubled in the HTML 5 nav element that wraps a ul or ol.

The main side-effect of the end of XHTML 2 is that its resources will now be given to HTML 5. It also adds to the pressure to include RDFa into HTML 5 (Microformats, being elements and classes, “work” already). Given that Google (the employers of the HTML 5 spec editor, Ian Hickson) and Yahoo are starting to use microdata, it’s almost certainly untenable to claim there are no use cases for it, and RDFa is already a W3C specification, albeit ugly to write and opaquely documented.

Further reading (with no singalongs)

(Last Updated on )

Buy "Calling For The Moon", my debut album of songs I wrote while living in Thailand, India, Turkey. (Only £2, on Bandcamp.)

20 Responses to “ Goodbye XHTML 2 ”

Comment by Jamie Knight


Nice to know that efforts will be concentrated, though with HTML5 having XML compatibility it makes it a mute point for me.

Long Live XHTML (just not version 2 🙂 ).


Jamie & Lion

Comment by Michael Hausenblas

Thanks BL for pointing this out – haven’t seen it somewhere else, yet.

Btw, what precisely do you mean with ‘… RDFa being opaquely documented.’?

I’d love to learn where we missed out a single chance to write about RDFa, offer tutorials, provide code snippets, etc. – only recently we have started work on a combined linked data/RDFa tutorial [1]. Any comments re that?



Comment by David

Where did you get the idea that HTML 5 allows href anywhere? Last I checked, this simplification was rejected, and href continues to be allowed only inside <a>.

Comment by bruce

I don’t say that it does, David. I say ” XHTML 2 allowed “href anywhere” so anything can be a link, and HTML 5 has a similar idea, although it preserves backwards compatibility by allowing the a element to surround block-level elements.”

So XHTML’s <div href="blah.html"> does nothing in current browsers. HTML 5’s equivalent <a href="blah.html"><div>…t;</div>&lt/a> works in current browsers and is functionally equivalent.

Comment by David

Oh, so you really meant <a>. That makes more sense. Alas, the situation is still disappointing, as is the lack of “src anywhere”.

Comment by David

The lack of href anywhere (without the need for a separate <a>) is what I was saying was disappointing. href-within-<a> anywhere is still an improvement.

Comment by Joshua

The only thing I was looking forward to in concerns with XHTML2 was the generic h tag, delivering us from the illness of numbering headings. But all in all, it’s worth losing XHTML2 and just having one main standard. As HTML 5 has its own XML serialization (often called (X)HTML5, or less-commonly, HTML5+XML), I agree, any worry that people have over losing XML is unnecessary.

So the effects of losing XHTML2? Minimal. The main effect of it would be a final release from wondering which spec would make it (if it wasn’t already obvious two or three years ago). It offers some final closure, and in the end we’ll still have much the same options, if not more. We keep the img tag, we keep br as breaking within paragraph level (as is sensible), we have canvas, we have object, video, and audio, and we lose all the presentational attributes and elements that CSS handles to begin with! It can all be handled by one standard now, and with less investment! Score!!!

Comment by HTML 5 oder XHTML 2

[…] Everything you know about XHTML is wrong – Goodbye XHTML 2 – HTML 5 + XML = XHTML 5 – 2022, or when will HTML 5 be ready? XHTML 1.0 ist nicht (viel) mehr als […]

Comment by 173. UX | Boagworld

[…] little movement from the working group. According to Bruce Lawson the decision to drop XHTML will make little difference to most developers. However, one can at least expect to see an acceleration is the adoption of HTML 5 and hopefully […]

Leave a Reply

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> . To display code, manually escape it.