HTML5 doctype putting IE9 into quirks mode?

HtmlInternet Explorer-9Doctype

Html Problem Overview


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?

Html Solutions


Solution 1 - Html

Placing:

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

in the <head> tag should do it.

Solution 2 - Html

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.

Solution 3 - Html

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" />

Solution 4 - Html

Remove any unsupported comments, check for ie supported comments. And place in your head tag. The doc type declaration should be the very 1st line in your HTML.

Solution 5 - Html

I have in the head mentioned in all the pages. However it is just showing correctly for the home page for all other pages the page is still rendered in scattered mode.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAbhishekView Question on Stackoverflow
Solution 1 - HtmlDavid WickView Answer on Stackoverflow
Solution 2 - HtmlzuallauzView Answer on Stackoverflow
Solution 3 - HtmlIan BoydView Answer on Stackoverflow
Solution 4 - HtmlBiswajit ChatterjeeView Answer on Stackoverflow
Solution 5 - Htmlavinava basuView Answer on Stackoverflow