An HTML comment inserted after the xml declaration and before the doctype declaration will trigger IE 7 and IE 8 into backward-compatible "quirks" rendering mode when it should not do so.

Live (actual) result in your browser:

Test passes if there is a filled green square and no red.

Firefox 1.5, Firefox 2, Firefox 3, Opera 9.27, Opera 9.50, Safari 3.1.2, Safari 4.0, Konqueror 3.5.9, Hv3 TKHTML alpha 16, Amaya 10.0.1, Seamonkey 1.x, Seamonkey 2.x, NS 7.2, K-meleon 1.x, Galeon 2.0.4, Epiphany 2.22 all pass this test.

This bug has also been reported in A comment before the doctype triggers quirksmode in IE7 by Alan Gresley.

Credit must go to Ingo Turski for discovering and reporting this bug at IE blog on March 6th 2008 and to Dean Edwards for discovering and reporting this bug at IE blog on September 15th 2005.

This bug has been reported at connect's IE beta feedback as bug 354956. This bug has been closed by the IE team and will not be fixed for the release of IE 8 final.

Valid XHTML 1.0! CSS compliant