Updated 2 Nov 2005: XML namespace attribute added [see note 1]
Amid seas churning with DOCTYPE indecision and littered with the flotsom of MIME-type argument wreckage, I've decided to harbor in the relative safety of XHTML 1.1 and text/html. That is, until I see a clear de facto standard trend -- or someone (perhaps you) convinces me otherwise, I'm staying put.
John Oxton recently started a conversation asking if XHTML and CSS are easy. It is a deceptively profound question because they are easy but there are few best-of-breed designers embracing them. Or rather, it. XHTML. I think everyone is agreed on CSS, it's the XHTML portion of the pair that generates debate.
XHTML is easy to understand - I can teach well-formedness to just about anyone in five minutes. Easy stuff. So let's take an unscientific survey of the design landscape by reviewing the DOCTYPEs of several top designer sites and their validity results [see note 2].
- If XHTML is so easy, then why are these folks serving HTML4?
- Why can't these folks get their XHTML to validate?
- But these folks can?
Why are some people using Transitional and others Strict? Aren't they all targeting the same audience?
If the internet design lords can't agree on the proper content markup course, then what are we, the internet design cerfs supposed to do? I wish these folks would provide some leadership in this area.
In Defense of XHTML 1.1
I'm sticking with XHTML 1.1 because it is, last time I checked, the W3C recommendation. And yes, I will serve it up unashamedly as text/html. This isn't the first time I've made a standards compromise to ensure browser compatability.
Please understand that I, in no way, believe my tag soup is better than your tag soup. I'm just trying to find somewhere to moor my DOCTYPE (to really belabor the analogy) until the design waters calm. XHTML 1.1 seems as good as any other.
What is obvious, however, is that 100% pure compatibility will have to wait.
Sincere thanks to Anne van Kesteren for sheding some light on how browsers deal with MIME and DOCTYPE declarations. iamacamera.org is referenced in the article and, indeed, at the time of Anne's post, did not contain an XML namespace attribute in its DOCTYPE declaration. It does now.
HTML validity checks were made on 31 Oct 2005. I did not perform any sort of site-wide exhaustive search looking for validity errors, I just poked around for a few minutes to see if I could find any. If I didn't find any, then I moved on.