Posted on 1/5/08 by Felix Geisendörfer
I don't know how often I had to discuss this with people over the past months, so let me say this once and for all:
XHTML is a joke. It is an elitist trend against the very nature of the web and offers no advantages over HTML 4.01 strict!
This is an old old discussion and there are great resources that list all of the problems associated with using XHTML. All I want to address in this post are two problems I have with XHTML:
1) Strict rendering is a STUPID idea
I don't know if I am the only one that realizes this. But if all your favourite web sites were to be converted to XHTML strict most of them would be unusable half of the time because of tiny errors in views. XHTML promotes that the slightest mistake in your markup will cause your page to NOT RENDER!
To me this is the most ridiculous concept ever. The view / presentation is the least important layer in any application and XHTML says it should be able to completely crash your page. Give me a break, but this is madness.
[Edit: 2008-05-02] When I say that the view is the least important layer than I mean that it should be most the forgiving layer because it does no business critical data processing.
Publishing content on the web should be easy for everybody. I am against anything raising the bar in that regard. Of course I wish MySpace never happened, but millions of people absolutely love the idea of expressing themselves in the most ridiculous ways. Heck, if I never had gotten into the web industry you can bet that I would have a 5mb MySpace page that brings any browser to its knees.
So let us come up with better standards, but please make them forgiving about mistakes within reasonable boundaries. The main reason we all use PHP (or any other dynamically typed language) is that we hate strict boundaries. We love flexibility in any form, and I strongly believe that flexible and forgiving standards are far superior in terms of enabling innovation compared to strict standards like XHTML.
2) Presentation agnostic XHTML is an ILLUSION
The biggest advantage people see in XHTML is that it is supposedly better at separating content from presentation. That is BS. XHTML pretty much supports the same set elements as HTML, including strictly presentational ones. But more importantly: If you ever tried to completely change the design of an XHTML page I know that you cheated and changed the markup.
[Edit: 2008-05-02] The above is meant in the context of real world situations with dynamic content. CSS Zen Garden and similar sites are not realistic web environments. See comment below.
So if you are under the impression that by using XHTML your pages automatically become presentation agnostic data sources that can be aggregated you are hallucinating. Microformats and web scraping is what you should look into.
Conclusion: I think XHTML did a ton of good for the web. It gave people a way to draw a line between traditional table driven HTML layouts and modern XHTML / CSS approaches. It spawned a wave of support for semantic markup and web standards. But looking at XHTML as a format by itself I see no advantages in it. I have big hopes for HTML5. Meanwhile I feel very happy with the feature set and philosophy provided by HTML 4.01 and will continue to use it.
Looking forward to feedback on this.
-- Felix Geisendörfer aka the_undefined
You can skip to the end and add a comment.
This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.