Web Standards Smackdown: XHTML2 vs. HTML5

Standards Smackdown: XHTML2 vs. HTML5Way 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:

  1. 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.
    1. 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.
  2. 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:
    1. XHTML syntax is widely accepted and used
    2. the rules (once you learn them) are consistent and easy to remember
    3. you leave less to the browsers to interpret (and possibly mess up)
    4. XHTML will make your pages more easily understandable to other developers

    Some of the new exciting deluxe features in HTML5 are:

    1. HTML5 will give you energy and help you lose weight! No, not really.
    2. New structural tags to help you avoid the overuse of the one-size-fits-all div tag: header, nav, section, and footer, to name a few.
    3. New semantic tags, like time, figure, and aside
    4. 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

    Thanks to a schoolyard row among Apple, Google, Mozilla and Opera, there sadly will be no simple video or audio tag in HTML5.

For further reading, check out:

One Comment

  1. Jesse M

    Ahh-cleared up some confusion there. I heard something about that whole thing, but didn’t believe they could think about killing off XHTML.

Leave a Reply

Your email address will not be published. Required fields are marked *