Discuss as:

I find your lack of DOCTYPE disturbing

So, it turns out that more than a few of you are aware of the command+U key combination in your browser (for the non-geeks in the house, that's a common keyboard shortcut for View Source). And a few of you have even noticed that, despite our efforts to write the best code possible, the HTML markup still leaves much to be desired. For instance, the site doesn't validate with the W3C and, a far greater sin, doesn't even bother to declare a DOCTYPE. How, some have asked, can we say that we care about standards when we are missing these fundamental pieces?

The short answer is that msnbc.com is eleven years old. We have thousands of legacy pages that date back to the time when Netscape 2 was the dominant browser in the marketplace. We're working on solutions to get this content into our new, more flexible system, but if we'd waited to port everything over, we'd be declaring a DOCTYPE of HTML 6.0.

The longer answer is a bit more complicated. We could, of course, just leave legacy pages without a DOCTYPE and carry on, boldly into the future, but some pages (like stories) still use components that don't expect a DOCTYPE and break the page rather horribly. We're also having to reconfigure our CMS to support DOCTYPES properly - a task that's actually more difficult than writing a line of markup at the top of the page. For instance, to be XHTML compliant, we have several dozen legacy bugs to fix to be considered valid XML. I'm personally lobbying for HTML 5, so, Safari 3 users, get ready.

Then there's the classic problem of design and development disconnection. The site architecture actually supports having a DOCTYPE right now - I could pick one from a dropdown, hit republish and make the world a better place. In fact, when I first fired up TextMate to write the first draft of HTML that would eventually become the new site, I specifically chose HTML 4.01 Transitional. Why? Because it makes my job easier. Using a DOCTYPE makes bad browsers behave, at least a little bit. Not using a DOCTYPE has made life harder for all of us working on the site markup because it means we have to work around the various quirks of that perpetual thorn in my… side, Internet Explorer. But we ended up not designing with a DOCTYPE because we weren't sure that feature was going to make the release and had to assume the worst in order to make our deadline. Declaring a DOCTYPE right now would actually break the site in some browsers because of these workarounds. Believe me when I say, I would've slept a lot more, and probably have at least a little bit more hair on my head, if appeared at the top of our homepage.

Like anyone else who's eyes haven't glazed over by reading this far down, I'm a geek. I know it's easy to fire off a quick blog post and become righteously indignant about these sorts of things (guilty). Again, I ask for your patience and understanding. We know what needs to be done, we actually do this stuff for a living (some of us for fun, as masochistic as that sounds). We're working hard to deliver the very best site possible, inside and out, I promise.