HTML5 doctype putting IE9 into quirks mode?

I'm trying to get IE9 to load my page with IE9 standards...

I noticed having <!DOCTYPE HTML> puts the damn thing into quirks mode... Which pretty much breaks everything on page...

How do I get IE to stick to IE9 Standards?


Placing:

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

in the <head> tag should do it.


Make sure you don't have any HTML comments before the DOCTYPE declaration otherwise it will trigger IE9 to use quirks mode.

Just having <!DOCTYPE html> at the very top of the page with nothing preceding it should be enough to make IE9 use standards mode. You shouldn't need the meta tag as well.


Using the WebBrowser control to display HTML will use IE8 rendering, regardless of doctype, unless you specify

<meta http-equiv="X-UA-Compatible" content="IE=9" />

or

<meta http-equiv="X-UA-Compatible" content="IE=edge" />