Some years ago there was a lot of fuzz about the importance of the W3C XHTML standard. I’ve always been a firm believer of the standards and built every website to comply with them. But why?
Very brief history
The standards have made a huge difference historically speaking, because they helped eradicate browser specific mark-up to such a degree that it today doesn’t really matter if you use Opera, Firefox or IE. The same is true with the CSS standard to some extend. The next releases from the browser manufactures will be even more compliant until they reach ~100% and that is fantastic from a web developer’s point of view.
Strange selling points
Over the years I’ve heard a lot of strange selling points about XHTML, mainly from smaller web design companies. They tell you why they use XHTML and why it is a future proofing feature of their work. Some of these selling points make sense in theory, but is out of touch with the real world. Below are four of those selling points and why they don’t matter as selling points for XHTML.
Separation of content and style
XHTML is XML
One of the biggest lies about future proofing using XHTML is the argument that XHTML is XML.
Because XHTML basically is XML documents it means that those web pages are machine-readable using XPath.
Today, we know that we cannot rely on the XML validity of XHTML documents in general and therefore don’t see them as XML documents suitable for machine parsing. The DOCTYPE tells you one thing, but try to run the validator on an entire website and see how many errors it finds. Normally we use regular expressions to parse XHTML documents when we instead could have used XPath according to the selling point. But of course, we can’t.
Another great selling point is that XHTML web pages are readable on mobile devices or take very little modification to be. That was not correct 5 years ago and it still isn’t even though mobile browsers have become much richer such as Opera Mini and Pocket IE.
The newest standard
XHTML is the newest HTML based standard so it will be easier and cheaper to upgrade to the next standard when it arrives. That’s also a good one. XHTML 1.0 is from January 2000 and has had a small upgrade to XHTML 1.1 a couple of years later. What is the average lifespan of a website compared to the lifespan of a W3C standard? I’ll bet that the website changes before a new standard arrives and even though it arrives before, which browsers will then be ready to fully support it and will it be backward compatible?
Yes, XHTML is the newest standard and it will be cheaper to upgrade, but it doesn’t carry much weight in practice and thereby isn’t future proofing.
The real selling point
So what is the selling point really? If it isn’t the machine readability, the mobile rendering, the newest standard or the fact that you can separate content and style, what then?
The reason I use it is because it has better cross-browser support in the DOM and it look prettier, but is that really a general selling point for an entire standard today? I’m not surprised by all the web developers who don’t care about XHTML when the selling point is so hard to find.