BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

XHTML 2 and HTML 5 continue to diverge

by Matthew Bass on Aug 08, 2008 |

These two markup standards were designed to bring their predecessors up to date with the modern web. A cursory glance at the acronyms might lead one to believe that the specs are similar. In truth, they have quite different purposes and solve two distinct problems.

XHTML 2 is a step back towards the design philosophy of the HTML the web grew up on. It continues refining XHTML 1.x towards a clearer definition, while also providing enhancements such as improved hyperlinks, annotations, interactive forms, and specialized semantics. XHTML 2 is mainly targeted towards what the early web was good at: rendering documents and linking between them. A W3C working group initiated the development of the XHTML 2 standard in 2002.

HTML 5 will eventually replace HTML 4. In addition to enhanced markup, it provides several new APIs for handling multimedia, history, editing, etc. as InfoQ reported in January. HTML 5 was not started within the W3C, but was instead initiated by the WHATWG, or Web Hypertext Application Technology Working Group, in 2004. The group felt that XHTML 2 focused too much on rendering documents instead of providing markup features suitable for forums, e-commerce portals, and other sites that were not document-centric. HTML 5 was adopted by the W3C in 2007.

Both XHTML 2 and HTML 5 use different namespaces. This allows them to be implemented in the same XML processor. HTML 5 supports both text/HTML and XML serialization. And to confuse matters somewhat, the XML serialization built into HTML 5 is known as "XHTML 5."

The XHTML 2 standard is not reverse-compatible with XHTML 1.x or HTML 4. HTML 5 is somewhat compatible with HTML 4. The migration path from HTML 4 to HTML 5 is said to be smoother than from XHTML 1.x to XHTML 2. Neither standard is official yet. Most modern browsers support both HTML 4 and XHTML 1.x so it seems likely that both new specs will be supported as well.

Developer response to the new initiatives has been mixed. Robert Nyman blogs that:

...both specifications are interesting and definitely contain some nice enhancements, [but] I can't help but think when, and maybe even if, any of these will be ready for prime time. Maybe I'm just jaded, but for sure there will be endless discussions about which will be the best, different implementations in different web browsers and so on...

Freelancer Mike Malone allays some justifiable concern about another standards war in his own comparison of XHTML 2 and 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.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

bottleneck Internet Explorer by Bojan Antonovic

While both XHTML2 and (X)HTML5 have their benefits, there is one big bottleneck: The Internet Explorer. None of those technologies will have a wide spread if Microsoft does again nothing for years or decades. (X) HTML 4.01 became standard in 1997. Today we have 2008. With luck the IE 8 will pass the Acid 2 test. And what about the Acid 3 test?



HTML 5 builds on HTML 4 strict. How many pages are today even valid HTML transitional? Many of them have even tag attributes for Netscape Communicator 4 and IE 4!

By the actual speed of development it will be 2020 when 20% of all web sites have (mostly invalid) HTML 5, if ever.

Re: bottleneck Internet Explorer by Jose Ernesto Lara Rodríguez

And again, a new standard is neccesary. Plus, Microsoft is starting to pay some attention to standards: my opinion is that it's due to the small loss of market in front of Mozilla's Firefox, and that we are seeing the beggining of another navigator war. Bill gates is a visionary, and if he's smart, he will move to take the lead in supporting these new standards.

Re: bottleneck Internet Explorer by Shimon Amit

Yes, Microsoft is paying more attention to standards than in the past but is it enough?

In my opinion they are doing just enough to graduate from their "non standards compliant" stigma, but they still have a vested interest in IE not becoming fully compliant. If it did, it would usher in a slew of innovations which would undoubtedly compete head-to-head with Microsoft's technologies. Microsoft would be playing on common ground rather than on its private court.

There may be a gang of enthusiastic *technologists* in Microsoft promoting "standards compliance" (and blogging about it) but management and marketing will always "slow things down" just enough to make them seem compliant but not enough to allow fair competition.

Completely misleading by Jakub Nešetřil

From my own development and management experience, this article is completely off the mark. XHTML2 is a lofty theoretical endeavor without contact with reality. It's solving stuff like better hyperlinking - however I've never heard anybody complain about lack of hyperlinking features in existing HTML versions.

HTML5 was created as a reaction to this perceived disconnect with real needs. It's original goal was simple, iterative enhancement of current HTML pain points. It reverted back to HTML serialization as a recognition of the current status, where proper XML serialization and full browser compatibility is unobtainable.

HTML5 is trying to solve very current pain points in web application development (here the article correctly states the different objectives - document-based vs. everything else). However, most importantly parts of HTML5 are already working and functional in browsers - today. The rest has very specific adoption plans. I've never heard anybody contemplating actually implementing or using XHTML2.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

4 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT