A couple of important things happened over the last few months that most people might have missed.
FACT
The Director of the W3C announced on July 2nd the the XHTML 2 Working Groups charter would not be renewed beyond the end of 2009. Henceforth resources would be redeployed to the HTML5 project.
http://www.w3.org/News/2009
FACT
Around the end of May, Google switched their homepage over to HTML5 Doctype. The head of the HTML5 group, Ian Hickson works for Google.
The company is obviously making a very big bet that HTML5 will drive the future of the web and they are hoping to lead the charge.
http://radar.oreilly.com/2009/05/goo...on-html-5.html
FACT
XHTML was a fake anyway.
Remember that scene from the Matrix where the guy says
"Hold on to your seats, cause Kansas is about to go Bye-Bye..."
Well there is a similar shock in store for XHTML fans.
Most people who are familiar with whats under the hood of their web pages would know this tag.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
You are likely to see it in almost every page source you check.
The key piece of code to focus on here is:
content="text/html"
This is the MIME type which identifies the content as HTML, which means that user agents must parse and interpret the contents as HTML.
You heard correctly! All your beautifully formed XHTML code gets
relabeled by the MIME type and parsed as its shabby old school HTML cousin so far the browser is concerned.
Why do this?
Well the plot thickens and our usual villain Internet Explorer plays its usual spoiling role. I turns out the IE does not recognize the correct XHTML MIME type which is application/xhtml+xml. Even IE8 will choke and ask you if you want to download the file if it hits this encoding. There are hacks to get IE to recognize the MIME as html/text but really, whats the point. If the content is suitable for html/text you might as well use the html/text MIME to begin with. Which most of us do.
So why the big fuss about XHTML in the first place?
MYTH
"You need XHTML to do Ajax".
Wrong.
Actually you don't need a DOCTYPE at all for that purpose.
The Google homepage (in)famously didn't have a DOCTYPE until
the recent change and yet "Google Suggest" still worked just fine.
MYTH
"XHTML is good for Accessibility"
Wrong.
Actually the WCAG1.0 says this:
We should 'create documents that validate to published formal grammars' (checkpoint 3.2, priority 2), 'use W3C technologies when they are available and appropriate for a task and use the latest versions when supported' (checkpoint 11.1, priority 2) and 'avoid deprecated features of W3C technologies' (checkpoint 11.2, priority 2).
http://www.w3.org/WAI/GL/WD-WCAG10-T...e-presentation
HTML 4.01 Strict DTD covers all of those bases.
But wait a minute! There must be some benefit of using XHTML?
Well perhaps, but not much.
People who like tidy, consistent, human readable code usually like XHTML because the validator enforces case sensitivity of tags, balancing opening and closing tags and so on. The HTML4 validator is more lenient and also allows the coder to forget a few tags which it classes as optional but the XHTML validator does not. But (mostly) the browser will still do a respectable job of working around sloppy code. The real issue is when DOCTYPE is omitted entirely and browsers are sometimes forced into
quirks mode. But that is a separate issue from XHTML versus HTML.
Basically, XHTML was hyped up when it first came out and then the developer community realized it wasn't all they hoped.
Conclusion
Its going to take a lot of years for all the browsers to fully implement HTML5 but ultimately it will happen. CSS evolved in much the same way, slowly at first but quickly gathering steam. Already Opera supports many of the HTML5 features and it won't be long before the others surely follow.
Check out this Sitepoint article to see what HTML5 has to offer in the way of new semantic tags.
http://www.sitepoint.com/article/html-5-snapshot-2009/
Other sources:
http://www.sitepoint.com/forums/show...p?t=393445#q12
http://annevankesteren.nl/2004/08/mime-types