Oops! Dead End

November 2, 2003

1/12/2022: This page is old and somewhat outdated; it remains here only for archival purposes.


I am currently converting the entire site to HTML 4.01 Strict. This means I will no longer qualify for the X-Philes. It has been a fun and interesting but frustrating journey.

Being a stickler for doing things “by the book,” I have been using the ?xml prologue in addition to serving application/xhtml+xml to better browsers. Everything was fine until I decided that I should also use the ?xml-stylesheet processing instructions along with the style and link elements. Every browser I checked handled it fine until I got to IE6/Windows, which tried to render the page as generic XML. I was able to verify this by saving a copy of the source code on my hard drive with a .xml file extension. Our Home page served as an .xml file renders fine on the best browsers, but only with ?xml-stylesheet linking. IE 6 messes it up badly.

Internet Explorer cannot render XHTML properly when served according to the W3C spec; its XML rendering mode left the page a terrible mess, with all of the links broken and the page useless (see screenshots below).

A lot of reading and research went into this. I realized that my reasons for converting to XHTML served “correctly” didn't hold water:

  1. Forward compatibility — I think HTML will be around for a long time, especially considering the number of tag soup pages out there today.
  2. Giving the best browsers what they want — that means giving invalid HTML to everyone else, since that’s how they parse it.

No more! I’m with Mark Pilgrim* on this one: it’s dangerous. I’m with Hixie: it’s considered harmful and can possibly mislead less experienced authors. Don’t get me wrong: XHTML offers some great scripting possibilities, not to mention the extensibility of XML for those who need it (like Jacques Distler, who blends two namespaces). But until it’s well supported by the vast majority of the browsing public, I’m sticking with HTML 4.01 Strict.

*1/12/2022: Mark Pilgrim’s article entitled “Eddies in the space-time continuum” (January 14, 2003) is no longer available.


Below are two screenshots of the Petitt’s Creations home page on Sunday afternoon, November 2, 2003, as rendered on Internet Explorer 6.0 running on Windows 98 Second Edition. The page was delivered to the browser as text/html in both cases, but the browser read the ?xml-stylesheet processing instructions and tried to render the page as generic XML, with disastrous results. In the first case, the main style sheet was linked to externally; in the second, it was imported through a style element in the page source which was then linked to by an id attribute. Apparently, IE couldn’t find the style sheet using this method and so rendered the page as plain unformatted text.

Each image is a link to a text document containing the corresponding page source. IE users will need to select View > Source from the menu because the browser may try to render the text document as XML.

First screenshot of craft home page rendered in XML by IE6/Win

Second screenshot of craft home page rendered in XML by IE6/Win