dionidium.com

Wayne Burkett's Weblog | Home

Why We Use XHTML
11:50PM CST September 03, 2003

In Bulletproof XHTML, the most recent installment of Dave Shea's A Second Voice, X-Philes maintainer Evan Goer writes:

The lack of XHTML applications has a more insidious effect in that it raises the cost/benefit ratio for converting to XHTML. We can convert, but most of us won't be doing anything with it -- the benefit is low.

The cost of converting to XHTML is indeed high. And, let's face it, we're not currently using specialized markup (like MathML) that would be inaccessible with HTML. So, why do we use it? Two reasons immediately come to mind:

  1. XHTML creates a Web that is ready for the future. We're not using specialized markup today, but we might someday. With XHTML, we'll be ready.
  2. XHTML encourages good behaviour. Since we send our site as application/xhtml+xml to browsers that support it, we're forced to create well-formed documents. There are no free passes. Every entry to our weblog must contain well-formed markup. This is a feature, not a bug, of XML.

We are able to realize the above benefits, please note, only because we're using the proper MIME type to serve our XHTML documents as XML. XHTML as text/html, we've come to understand, is largely useless.

Evan, again:

In short, switching your site to XHTML is not a no-brainer, and the trade-offs and decisions only multiply when you get down into the details. Each designer must weigh these costs and benefits individually. There is no "right" answer.