Grow your CSS skills. Land your dream job.

HTML 5 vs. XHTML 2: An Article Roundup and Poll

Published by Chris Coyier

Much like CSS3, widespread adoption for the next-gen web languages is a distant mirage. Still, it is important to stay educated on these things and even participate in these early stages while things are still malleable. Rather than re-hash everything here, here is a roundup of articles talking about the two major new "competing" formats.

There is also a new poll in the sidebar where you can cast your vote as to which one you prefer at this point, or if you just don't care.

XHTML 2 vs. HTML 5

What everyone wants to avoid is another standards war. Fortunately, since both languages support XML namespaces (or, in the case of the HTML serialization of HTML 5, DOCTYPE switching) it's unlikely that we'll see the sort of browser dependent behavior we did in the 1990s. Standards wars aside, the future looks bright for web development. These new markup features and APIs will provide a rich environment for web development that should narrow the gap between Web and Desktop applications.

X/HTML 5 Versus XHTML 2

Both X/HTML 5 and XHTML 2 are competing to replace HTML 4 and XHTML 1. Even at this early stage of development, some browser vendors have already stated their preference for one spec over the other. As a result of the haste and closed nature of deliberations, this issue is starting to polarize the Web standards community. As the two specs progress, more development and marketing dollars will be invested into one spec than the other, and all the ingredients are in place for a standards war.

The Web's future: XHTML 2.0

The only thing that is certain about the 5 August 2002 working draft of XHTML 2.0 is that nothing about it is certain. It will almost definitely change in some way between now and adoption as a recommendation, but the goal of emphasizing structure and semantics isn't likely to change. For this reason, it's a good idea to take a look at the pages you build now, and start getting into the habit of using structure and styles appropriately. Use markup to designate what something is, not what it should look like, and use CSS to do the rest. Overall, think more about the structure of your documents and what you want them to do, and not necessarily so much about what they should look like.

A Preview of HTML 5

Work on HTML 5 is rapidly progressing, yet it is still expected to continue for several years. Due to the requirement to produce test cases and achieve interoperable implementations, current estimates have work finishing in around ten to fifteen years. During this process, feedback from a wide range of people including, among others, web designers and developers, CMS and authoring tool vendors, and browser vendors is vital to ensure its success. Everyone is not only welcome, but actively encouraged to contribute feedback on HTML 5.

HTML5, XHTML2, and the Future of the Web

While XHTML2 is a semantic improvement over XHTML 1.0, it does not seem likely that it will matter for web developers for a long time, especially when one considers that Internet Explorer still doesn't offer XHTML 1.0 support. It will take many years for a new version that might support XHTML2 and we have been given no indication that the next one will. On the other hand, many parts of HTML5 are already creeping into browsers, and, if Microsoft takes an active part in the development of HTML5 in the future, it looks likely that many features that are already very polished will be supported cross-browser in a much shorter timeframe. The fact that HTML5 contains several areas that are already ready for implementation while still being developed in other areas makes it a technology that is easy to partially adapt until browser support is fully evolved for the features you wish to use. HTML5 will be the future of the web, so my advice would be to pay close attention to it.

Check all of the CSS-Tricks polls and results over on the Polls page.

Comments

  1. The markup for HTML5 will be very easy to learn, compared to learning HTML4.01 (or pre-4.01) and CSS pre-2 (before you had sites like this).

    Also, I believe the accessibility will be extremely improved when you’d start to use <nav>-containers around the navigation. Then a screen-reader could just make a menu-list out of it.

  2. Here’s my submission.

  3. I think you description of them as a “distant mirage” is apt.

    I still have to give great thought whether or not to use a transparent PNG file on a webpage so I think it will probably be another decade maybe two before I mark up a site in these modern specifications.

    At least with CSS you can add eye candy that will degrade gracefully. What happens when IE6 comes across a nav tag?

  4. They both look very nice. It’s going to be a hard choice.

    I really like the new elements in HTML 5 like and . But I think i like XHTML 2 more. I really like the idea that every element can be a link (like Bla ) and that every element can be an image. The first will remove a lot of markup (all the a-elements) and image replacement won’t be necessary anymore. But how will for example Google respond to the changes in the markup of links? And how will older browsers render this new tags?

  5. Very nice article, xhtml 2 hasn’t got as much coverage as html 5 has. in my opinion i think html 5 is our future.

  6. XHTML 2 seems to be a dead standard since a large part of the web standards community and developers are supporting HTML 5.
    Opera, Safari, Firefox, … are implementing parts of the actual Working Draft of HTML 5.

    It’s surely much simpler to support a new “level” than a new “version”, XHTML 2 seems to be a step to far away from what actually is HTML 4 and XHTML 1.

    Maybe the question should more be : Is Microsoft going to support anything in the next years ? (haha)

  7. Kevin Segedi

    If it takes a decade to lock in HTML 5 spec and have browser support I think AIR/Flex/Silverlight et al will supplant HTML 5/XHTML 2… The need for capabilites by corparations, especially in the mobile device display area will make things move a bit faster than any spec being developed at a snails pace. It will also be interesting to see how the media center’s effect will have as broadband Internet merges with television/movies/entertainment. I’m just throwing things out there but I don’t see either spec having a huge impact on the future.

  8. HTML 5 for sure, I cant wait for full implementation of the new canvas tag. This will be a new revolution in JavaScripting (dom).

  9. Really nice article and pretty website, i discover you website just surfing on the net .I like css and stuff around.

    I learn more today about the next language, i just have to integrate it now into my brain ;)
    Bye.

  10. There really shouldn’t be any question about what people prefer. As far as web developers should be concerned, XHTML2 is irrelevant. There will be no standards war, HTML5 is the only real choice. If there are features in XHTML2 that people like, then such features are most likely already covered by an equivalent feature in HTML5 or are considered impractical and/or useless.

  11. @David Madden
    ROFL!!!!

  12. I will probably use both, depending on what suits the content best. More than likely, I’ll use HTML 5 for web-apps/blog-posts and XHTML 2 for traditional documents. (That is assuming the specs do not alter radically before they become official recommendations.)

    However, I think that HTML 5 will be favoured by “real-world” websites, as it contains a lot more snazzy features than the more conservative XHTML 2.

  13. I’ve been drooling over HTML 5 for awhile now and believe this will be the way I will be going for most web work. I just wish it was in place NOW. My greatest concern, however, is browser support. Standards seem to be taking just too long to get into place. Take CSS3 for example – there is already limited support in some browsers and I am already taking advantage of that. The longer it takes for the new standards to be finalised and for new formats to be put in place, the greater the risk that we will see hybrid development based around what browsers can support.

  14. REALLY GOOD ITEM! IT’S HELPFUL FOR ME, AND I THINK FOR MANY USERS! NICE SITE THX SO MUTCH!
    CHEERS :)

  15. Permalink to comment#

    The issue here is basically what happens when a legacy system (browsers that only support HTML 4 / XHTML 1, older CMS systems that don’t even have full support of HTML 4, WYSIWYG editors, and possibly some webservers) need to work with XHTML 2. Since XHTML 2 is not backwards compatible with HTML 4.01, the possibility of it causing older systems to fail entirely is distinctly possible. When these systems encountered XHTML 1 they would still be able to serve it since it is backwards compatible with HTML 4.01 (its really just HTML 4.01 reformulated as XML)

    However, XHTML 2 is XML. And therein lies the problem. The fact that Internet Explorer doesn’t really support XHTML as XML in any way, and the problems XML can cause when not all tools in the authoring chain are XML tools, means that there has been little incentive for using XML on the web. This is compounded by search engines not indexing XHTML as XML documents; very few XHTML authoring tools for XML; very few CMS or blogging tools supporting XML correctly all the way from input through database to generation; and very few ad suppliers supporting XML.

    However, HTML5 is (supposed to be) entirely backwards compatible. Meaning, old web browsers, CMS systems, and web servers will be able to at least work with it, and if it fails will (hopefully) degrade gracefully instead of failing entirely.

    In short, until all the old legacy systems that were built with HTML 4.01 in mind are gone, XHTML 2 may never be a recommendation. I think I’m going to go back to HTML 4.01 and wait for HTML 5 to show up.

  16. Permalink to comment#

    Hey man it is really superb. thanks to css-tricks. for contacts http://www.iumar.co.cc

This comment thread is closed. If you have important information to share, you can always contact me.

*May or may not contain any actual "CSS" or "Tricks".