IE8 opt‐in: no problem after all?

Warning This article was written over six months ago, and may contain outdated information.

After two days of commotion regarding the Internet Explorer team’s decision to include a standards opt‐in in the next version of their browser, Mozilla’s John Resig has noticed something rather important in an exchange on IE’s Chris Wilson’s blog; namely:

Internet Explorer 8 will support DOCTYPE switching for new DOCTYPEs (like HTML5).

What that means is, if you use the (very simple) HTML 5 DOCTYPE in your documents:

<!DOCTYPE html>

Your browser will automatically render in standards mode. Even IE8. The META switch will only be required for pages using currently existing DOCTYPEs.

That’s good news. Even better news is that all modern browsers (and IE6) support the HTML 5 DOCTYPE and so you can start using it today if you wish. The only slight downside is that the W3C’s Validator doesn’t recognise it, and so will report that your pages are invalid.

I think it’s perhaps too early to start using this already, but it’s good to know that the option is there; and, as John says, it would have saved a lot of frazzled nerves if the IE team had made this clearer upfront.

3 comments on
“IE8 opt‐in: no problem after all?”

  1. Well, the problem is that (as you say) it’s still too early to start using HTML5 on production sites for customers. The spec’s by no means finalised even if we do have a working draft.

    Having said that, for personal sites this is fine, and certainly better than the alternative of browser‐specific cruft.

  2. Apparently, the same will go for pages served as “application/xhtml+xml”. That means that as an alternative, we could use a conditional comment to serve pages as “text/html” to IE<=7, and serve “application/xhtml+xml” to every other browser.

  3. I forgot to state something important: XHTML support still hasn’t been confirmed in IE8 yet. (But I think they’ll add it)
    Anyway, what I said above should still work whenever IE supports XHTML, whether it is in version 8 or later…