August 5, 2003
I keep my RSS subscriptions fixed at a manageable 20; Jeffrey Zeldman's got a permanent spot on my list. Zeldman is a superb designer and a hell of a writer. I love Zeldman bunches.
And yet as often as I find his comments on web standards illuminating, occasionally I'm forcibly reminded that deep down Zeldman is a Technology Evangelist. Evangelists are great at efficiently spreading new ideas throughout the community... but the flip side is that they often have trouble departing from certain orthodoxies.
For a prime example of this, see Zeldman's Web Design World keynote. There's plenty of good stuff in the keynote overall, but this particular slide needs addressing:
"XHTML is XML that acts like HTML in browsers."
Better to replace "acts like" with "is", given that nearly all "XHTML" websites are actually parsed as HTML by all currently available browsers. (I suppose there are a rarified few sites that actually can be parsed as XML by certain highly advanced browsers, but this hardly counts as statistically significant.)
"It also works as expected in most Internet devices (Palm Pilots, web phones, screen readers)."
There are some who would dispute that. Apparently many real-world mobile devices happily support old-skool HTML cruft (table-based layouts, the
<font>tag) while ignoring the products of our more enlightened era (XHTML Basic, CSS). Weird but true.
"It's as easy to learn and use as HTML."
Except you have to teach people about closing tags, proper nesting, encoding all your ampersands, and so on. Meanwhile, people who feel like writing tag soup HTML can just whip out a text editor and go. (Then again, considering the tremendous popularity of tag-soup XHTML on the web today, maybe this is a distinction without a difference.)
"It's the current recommended markup standard (replaces HTML 4)."
The closest the spec comes to saying this is, "The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility." That's a fine marketing blurb, but it's not an official announcement that HTML 4.01 is deprecated.
"Because it's XML, it works better with existing XML languages and XML-based tools (SVG, SOAP, RSS, SMIL, XSL, XSLT, databases, etc.)."
This is pretty hand-wavy. On the server side, you can easily transform your backend data into valid XHTML, but you can also transform it into valid HTML 4.01 Strict just as easily. Heck, some people do both. On the client side, there are a tiny, tiny fraction of super-geeks who embed SVG or MathML directly in their valid and properly MIME-typed XHTML pages. These super-geeks are the only people in the world who have to present outward-facing XHTML; the rest of us are just fooling around.
"It brings consistency to web documents that was missing in HTML."
I assume this means "more consistency in coding style." XHTML theoretically enforces more consistency due to its more rigorous syntax... but since the vast majority of people can't be bothered to produce valid XHTML code, this benefit is somewhat obviated.
"It's a bridge to more advanced (future) XML languages and applications and perhaps to more advanced versions of itself (XHTML 2?)."
The presentation then goes on to cite nine websites that are using structured XHTML and CSS, including some big names such as ESPN and Wired. None of the sites serve up their pages as application/xhtml+xml to browsers that accept this MIME-type, which means that each site is being treated as... you guessed it, good old fashioned HTML. And that's a damn good thing, because four of the sites have invalid home pages, and four others have invalid secondary pages just one click away. The only site diligent enough to pass the "Laziness Test" is the CSS Zen Garden. (To his further credit, the creator of the Zen Garden is considering the MIME-type issues as we speak.)
Anyway. The point is not that cutting edge designs are bad; they're not. The point is not that "Evan hates XHTML"; I don't. XHTML allows you to do some amazing things that you can't do with HTML. Unfortunately, due to the dreadfully primitive state of XML browsers and tools, there's really nobody using XHTML for anything that you can't do with HTML.
The real problem is that XHTML is being touted as a replacement for HTML. It's not. XHTML is a different technology that suits different purposes. There are a lot of influential people who are blurring this distinction, and I'd like to think that they know better.