Way back in July, the W3C (the governing organization of web standards) announced that it was not going to renew the charter of the XHTML2 working group. In non-bureaucracy speak, that means the W3C has stuffed XHTML2 standards development into a bottle and chucked it out to sea, where it will spend the rest of eternity bobbing on the waves and following the thermal currents. The W3C did this so that it could focus all of its attention on developing HTML5.
“Wait a minute, ” one might shout on hearing this news, “I thought XHTML was the wave of the future, and HTML was what Cro-Magnons used to code their web pages??? What’s going on?”
Its easy to be confused, and, yes, even a little bit alarmed by this news. But, in essence, the labels here don’t really represent what you think they do: XHTML2 isn’t really XHTML as you know it, and HTML5 encompasses a lot more than HTML4.01. Here’s what you need to know about both of these standards:
- XHTML2 was a radical departure from XHTML1, was not designed to be backwards-compatible, and no major browser maker supported it.
Yes, you read that right. XHTML pages you’ve been building up until now would not be grandfathered in under XHTML 2 and may actually break. Why? In both the Dreamweaver and XHTML workshops, we explain that XHTML is a mostly happy marriage between the web-oriented HTML tags and the exacting syntax of XML. While this is theoretically true, in practice, browsers do not actually interpret XHTML1-formatted pages as XML. Why not? The biggest reason is that XML is an unforgiving standard – XML parsers will stop processing the document at the first error. We want web browsers to be more permissive than that, so that even if we forget to close a tag, the browser will still display our page as best it can. XHTML2 would force browsers and other clients to parse XHTML2 as XML, which potentially means that one error in a page’s structure would result in a broken page.
- Even thought XHTML2 is no longer, there were some cool aspects to the XHTML2 standard, including granting every XHTML element special powers like the ability to behave like a hyperlink and reference external media such as images.
- HTML5 is both XHTML and HTML, with new deluxe features to support what web developers want to do with web pages.
Are you familiar and comfortable with XHTML-style- formatting, where your page is well-formed, code is in lowercase, and tag attributes are quoted? You won’t have to change a thing for HTML5. And for those who prefer loosey-goosey HTML4.01 style syntax, where tags are closed, or not, and maybe sometimes in mixed-case? You won’t have to change a thing for HTML5. This aspect of the HTML5 standard is quite controversial, as there are many who argue that allowances for sloppy HTML syntax will make a mess of things behind the scenes. I would personally strongly recommend sticking with the fussier XHTML syntax for several reasons:
- XHTML syntax is widely accepted and used
- the rules (once you learn them) are consistent and easy to remember
- you leave less to the browsers to interpret (and possibly mess up)
- XHTML will make your pages more easily understandable to other developers
- HTML5 will give you energy and help you lose weight! No, not really.
- New structural tags to help you avoid the overuse of the one-size-fits-all
footer, to name a few.
- New semantic tags, like
- Features for more advanced web developers including the ability to store data in the web browser, send and receive messages across multiple documents, and drag-and-drop
Some of the new exciting deluxe features in HTML5 are:
Thanks to a schoolyard row among Apple, Google, Mozilla and Opera, there sadly will be no simple
audio tag in HTML5.
For further reading, check out:
- XHTML 2 Dies a Lonely Death, Makes Room For HTML 5
- Misunderstanding Markup: XHTML 2/HTML 5 Comic Strip