To enable IE mode on Edge, use these steps: Open Microsoft Edge on Windows 10. Click the Settings and More (ellipsis) button on the top-right corner. Select the Settings option. IE mode allows enterprises to specify a list of web sites that only work in Internet Explorer 11. When you navigate to these web sites in Microsoft Edge (Chromium), an instance of Internet Explorer 11 runs and renders the site in a tab.
In Settings choose Edge version 77 and Later from the Select a category type drop down box. In Settings choose Edge version 77 and Later from the Select a category type drop down box. We need to configure two policies:-3.1. Configure Internet Explorer integration (User) 3.1.1. Configure Internet Explorer integration Enabled 3.1.2. How to Enable Legacy Edge Mode in Microsoft Edge Chromium As you may remember, Microsoft Edge Chromium, the latest web browser from Microsoft, has a special compatibility mode with Internet Explorer 11, called IE Mode. This mode is quite useful for enterprise customers, which usually have legacy web apps that require Internet Explorer.
In order to deal both with content written according to Web standards and with content written according to legacy practices that were prevalent in the late 1990s, today’s Web browsers implement various engine modes. This document explains what those modes are and how they are triggered.
Summary for the Impatient
The main conclusion to draw from this article is that you should start all your HTML documents (i.e. anything that gets served as text/html) with <!DOCTYPE html> as the first thing in the source. (Read on to learn why.)
If you want to take extra care to make sure that users of IE8, IE9 or IE10 cannot press a button that makes your site regress as if it was being viewed in IE7, either configure your server to send the HTTP header X-UA-Compatible: IE=Edge for text/html or put <meta http-equiv='X-UA-Compatible'> in the head of your HTML documents (before any scripts). However, the default behavior of IE versions even prior to 11 is reasonable in most cases, and IE11 no longer put the Compatibility View button in the toolbar, so you don’t really need to jump through these IE-specific hoops. (Read on for exceptions.)
The Scope of This Document
This document covers mode switching as it applies to Firefox and other Gecko-based browsers, Safari and other WebKit-based browsers, Chrome, new Edge, Opera, and other Chromium-based browser, Konqueror, Internet Explorer for Mac, Internet Explorer for Windows (including Windows Phone) and browsers that embed IE, and EgdeHTML-based Edge. Instead of referring to the names of browser engines, the names of the best-known browsers using each engine are used instead.
This document focuses on the mode selection mechanism and does not document the exact behaviors of each mode. The purpose of this document is to give you information on how to avoid the legacy modes and enough research to be convincing. The purpose of this document is not to facilitate cherry-picking behaviors by deliberately choosing legacy modes.
The Modes
Here are the various modes:
Common Modes for text/html Content
The choice of the mode for text/html content depends on doctype sniffing (discussed later in this document). In IE8 through and including IE11, but not in Microsoft Edge, the mode also depends on other factors. However, by default even in IE8 and later, the mode depends on the doctype for non-intranet sites that are not on an exception list supplied by Microsoft. Additionally, there are other factors involved even with IE6 and IE7 if Google Chrome Frame has been installed.
In the Quirks mode the browsers violate Web format specifications in order to avoid “breaking” pages authored according to practices that were prevalent in the late 1990s. Previously, different browsers implementeddifferent quirks. In particular, in Internet Explorer 6, 7, 8 and 9, the Quirks mode is effectively frozen IE 5.5, while in other browsers the Quirks mode has been a handful of deviations from the Almost Standards mode. Recently, browsers have been converging on common behavior in their Quirks modes. Most notably, the primary Quirks mode of IE10 and IE11 is no longer an imitation of IE 5.5 but seeks to be interoperable with Quirks modes of other browsers. The interoperable quirks are being standardized at the WHATWG.
The primary Quirks modes of IE10 and IE11 that are like the Quirks modes of other browsers are sometimes referred to as the “interoperable Quirks mode” to distinguish it from the IE 5.5-imitating “Internet Explorer 5 Quirks” mode that IE10 and IE11 also have.
Ifyou are authoring new page, don’t use the Quirks mode. Just don’t. Use the Standards mode.
In the Standards mode the browsers try to give documentsthe specification-wise correct treatment to the extent implemented in aparticular browser.
Since different browsers are at different stages of compliance, the Standards mode isn’t a single target, either.
The HTML specification calls this mode the “no quirks mode”.
Firefox, Safari, Chrome, Edge, Opera (since 7.5), IE8, IE9, IE10, and IE11also have a mode known as “the AlmostStandards mode”, which implements the vertical sizing of table cellstraditionally and not according to the CSS2 specification.Mac IE 5, Windows IE 6 and 7, Opera prior to 7.5 and Konqueror did not need anAlmost Standardsmode, because they didn’t implement the vertical sizing of table cells according to the CSS2 specification in their respectiveStandards modes anyway. In fact, their Standards modes are closer tothe Almost Standards mode than to the Standards mode of newer browsers.
In retrospect, the Web would have been better off by not having the distinction between Standards and Almost Standards, having the Almost Standards behavior as the default and having a CSS property for opting into the behavior that is the default in the Standards mode. Still, you should use the Standards mode—not the Almost Standard mode.
The HTML specification calls this mode the “limited quirks mode”.
The Mode for application/xhtml+xml Content (XML Mode)
In Firefox, Safari, Chrome, Opera and IE9, the application/xhtml+xml HTTP Content-Type (not a meta element nor a doctype!) triggers the XML mode. In the XML mode, these browsers give the specification-wise correct treatment for XML documents to the extent implemented in a particular browser.
IE 6, 7 and 8 did not support application/xhtml+xml. Neither did Mac IE 5.
In the WebKit-based Nokia S60 Browser, the application/xhtml+xml HTTP Content-Type did not trigger the XML mode due to concerns of compatibility with ill-formed content in mobile walled gardens. (Legacy “mobile browsers” didn’t use a real XML parser and, therefore, ill-formed content has been labeled as XML.)
I have not tested the default browser on Symbian3.
I have not tested Konqueror sufficiently to say what exactly happens in that browser.
IE-Specific Web Content-Controllable Additional Modes from Microsoft
The following are additional IE-specific modes that are not specified by HTML5 and that other browsers don’t have. Their activation involves configuration or X-UA-Compatible as an HTTP header or a meta element (discussed below).

IE8, IE9, IE10, and IE11 have a mode that imitates the mode that was the Standards mode in IE7.
IE9, IE10, and IE11 have a mode that imitates the mode that was the Standards mode in IE8.
IE9, IE10, and IE11 have a mode that imitates the mode that was the Almost Standards mode in IE8. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 8 Standards”.
IE10 and IE11 have a mode that imitates the mode that was the Standards mode in IE9.
IE10 and IE11 have a mode that imitates the mode that was the Almost Standards mode in IE9. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 9 Standards”.
IE10 and IE11 have a mode that imitates the mode that was the XML mode in IE9. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 9 Standards”.
IE11 has a mode that imitates the mode that was the interoperable Quirks mode in IE10. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 10 Standards”.
IE11 has a mode that imitates the mode that was the Standards mode in IE10. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 10 Standards”.
IE11 has a mode that imitates the mode that was the Almost Standards mode in IE10. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 10 Standards”.
IE11 has a mode that imitates the mode that was the XML mode in IE10. In the developer tool user interface, this mode is not distinguished from “Internet Explorer 10 Standards”.
It is worth noting that the imitations of the previous versions of IE are not perfect. Random examples that I have encountered myself include IE7 Standards emulation in a later IE version handling @font-face-liked EOT fonts differently and the IE9 modes of IE10 supporting CSS 2D Transformations without the -ms- when the real IE9 requires the prefix. If you follow the advice given in this document, you won’t be targeting these modes, so the imperfections of the imitations won’t matter to you in production. However, the takeaway for testing is that you’ll be better off testing your site in actual old versions of IE running in a bunch of virtual machines than using the developer tools newer IE versions to make the new version emulate an old version for testing.
IE10 for Windows Phone 8 has all these modes, too—just like IE10 on desktop.

The old Spartan Edge based on EdgeHTML and the new Anaheim Edge based on Chromium do not have Web content-controllable IE modes and behaves like other browsers, but see below about local configuration that can make Spartan Edge launch IE11 or that can make Anaheim Edge load IE11 within Edge’s user interface.
IE-Specific Additional Modes from Google
The following are additional modes available in IE6, IE7, IE8 and IE9 (but not in IE10 on Windows 8 or on Windows 7 as of February 2013) when the since discontinued Google Chrome Frame has been installed.
This mode is the same as the Quirks mode in Google Chrome.
This mode is the same as the Standards mode in Google Chrome.
This mode is the same as the Almost Standards mode in Google Chrome.
Enterprise Mode and IE11 Mode
The modes discussed above are mode that Web content can choose to activate. IE11 and Chromium-based Edge (Anaheim) have additional modes that are mentioned here for completeness but that are not the main focus of this article, since they cannot be controlled by Web content.
IE11 has a feature called Enterprise Mode that allows local administrative configuration to designate some sites as loaded in Enterprise Mode that can either act as IE7 or as IE8. These modes are claimed to match the actual IE7 and IE8 better than the IE7 and IE8 Compatibility View modes. It's unclear why this is so. The claim is suggestive of Enterprise Mode loading a copy of the IE8 engine rather than the IE11 engine the with conditinal branches to activate old behaviors, but I haven't found a reliable source explaining how the Enterprise Mode and Compatibility View actually differ implementation-wise.
Chromium-based Edge (Anaheim) has a feature called IE mode, which allows local administrative configuration to designate some sites as loaded in IE11 or in the Enterprise Mode of IE11. This means that IE11 internals run within the Edge’s user interface.
In contrast, EdgeHTML-based Edge (Spartan) does not run IE11 within its user interface but instead launches the actual IE11 when encountering a site that local configuration designates as requiring IE. (This means that further navigations to other sites in IE11 do not return to using Edge.)
Non-Web Modes
Some engines had modes that are not relevant to Web content. These modes are only mentioned here for completeness. Presto-based Opera had a WML 2.0 mode. WebKit on Mac OS X 10.5 had a special mode for legacy Dashboard widgets (perhaps this mode remains in newer versions—I have not investigated). WebKit also has hacks for applications that embed WebKit on Mac OS X.
The Effects
Here are the main effects of the modes:
Layout

Except in IE, the modes for text/html mainly affect CSS layout and the style system. Forexample, not inheriting styles into tables is a quirk. In old versions of IE and Opera, the box model changes to the IE 5.5 box model in the Quirks mode. This document does not enumerate all the layout quirks. For a list, please refer to Mozilla’s documentation and the Quirks Mode specification.
In the Almost Standards mode (in browsers that have one and all the current ones do), the height of table cells containing only images is computed differently compared to the Standards mode.
In the XML mode, selectors have different case-sensitivity behavior. Furthermore, special rules for the HTML body element do not apply in older versions of browsers that do not implement the more recent adjustments to the CSS specifications.
Parsing
Thereare also some quirks that affect HTML and CSS parsing and would causeconforming pages to be misparsed. These quirks are toggled on and offwith quirky layout. However, it is important to realize that the Quirksmode vs. Standards mode is predominantly about CSS layout and CSS parsing—not HTML parsing. In browsers that have an HTML5-compliant HTML parser, there is exactly one HTML parsing quirk.
Somepeople misleadingly refer to the Standards mode as “strict parsingmode”, which ismisunderstood to imply that browsers enforced HTML syntax rulesand that a browser could be used to assess the correctness of markup.This is not the case. The browsers do tag soup fix-ups even when theStandards mode layout is in effect. (In the summer of 2000 before Netscape 6 wasreleased, Gecko actually had parser modes that enforced HTML syntaxrules and one of these modes was called the “Strict DTD”. These modes were incompatible with existing Web content and wereabandoned.)
Another common misconception is related to XHTML parsing. It is often thought using an XHTML doctype gains different parsing. It doesnot. XHTML documents served as text/html are parsed using the same parser that is used for HTML. As far as browsers are concerned,XHTML served as text/html is just “tag soup with croutons” (an extraslash here and there). Only documents served using an XML content type (e.g. application/xhtml+xml or application/xml) trigger the XML mode for parsing in which case the parser is totally different from the HTML parser.
Scripting
Although the Quirks mode is primarily about CSS, there are some scripting quirks as well. Until Firefox 14, the HTML id attribute didn’t establish object references from the global scripting scope in the Standards and Almost Standards modes. In Firefox, document.all is partially available in the Quirks mode but not in the other modes. The effects on scripting are more dramatic in IE when falling into a mode that emulates an old version of IE.
In the XML mode, some DOM APIs behave differently, because the DOM API behavior for XML is defined to be incompatible with the HTML behavior. With hindsight, this is quite unfortunate.
Doctype Sniffing (aka. DoctypeSwitching)
Browsers use doctypesniffing in order to decide the enginemode for text/html documents. This means that the mode is picked basedon the document typedeclaration (or the lack thereof) at the beginning of an HTML document.(This does not apply to documents served with an XML content type.)
A document type declaration (doctype) is a syntactic artifact of SGML—a legacy markup framework that HTML prior to HTML5 was purportedly defined in terms of. In the HTML 4.01 specification, the document type declaration is said to communicate HTML versioninformation. Despite the name “document type declaration” and despite what the HTML 4.01 specification says about “version information”, the document type declaration is not an appropriate means for classifying SGML or XML documents as documents of a particular type even though it seems it was supposed to be (hence the name). (More on this in the addendum.)
Neither the HTML 4.01specification nor ISO 8879 (SGML) saysanything about using the document type declaration as an engine modeswitch. Doctype sniffing is based on the observation that at the timedoctype sniffing was devised the vastmajority of quirky documents either didn’t have a document typedeclaration or they referenced an old DTD. HTML5 acknowledges this reality and defines the doctype in text/html as a mode switch only.
A typical pre-HTML5document type declaration contains (separated bywhite space) the string “<!DOCTYPE”,the generic identifier of the root element (“html”),the string “PUBLIC”,a publicidentifier of a DTD in quotes, possibly a system identifier (an URL) ofthe same DTD and the character “>”. HTML5 simplies the doctype to “<!DOCTYPE html>”.The document type declaration is placed in the document before thestart tag of the root element.
Choosing a Doctype
text/html
Hereare simple guidelines for choosinga doctype for a new text/html document:
<!DOCTYPE html>
This is what you should use. With this doctype, you can validate new features such as <video>, <canvas> and ARIA. Please be sure to test your page in the latest versions of the top browsers.
How To Use Internet Explorer In Edge
<!DOCTYPEHTML PUBLIC '-//W3C//DTDHTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
This doctype also triggers the Standards mode, but lets you stick to less precise legacy validation that doesn’t know about new features in case your organization has silly policies that require targeting legacy validation. But you really should be using <!DOCTYPE html> and get the policies of your organization revised.
<!DOCTYPEHTML PUBLIC '-//W3C//DTDHTML 4.01 Transitional//EN'http://www.w3.org/TR/html4/loose.dtd'>
This gives you the Almost Standards mode. Please note that your layouts based on sliced images in tables are likely to break if you later move to HTML5 (and, hence, the full Standards mode), so it’s better to make your designs Standards mode-compatible right now.
No doctype.
Please don’t do this. Willfully designing for the Quirks mode will come and haunt you, your coworkers or your successors in the future.
If you frustrated by the differences between old IE versions and still need to support them due to client requirements, it is better to apply specific hacks for legacy versions using conditional comments than seek commonality in the Quirks mode.
I am not recommending any ofthe XHTML doctypes, because servingXHTML as text/html is considered harmful. If you choose to use an XHTML doctype anyway, please note that the XML declaration makes IE 6 (but not IE 7!) trigger the Quirks mode.
application/xhtml+xml
The simple guideline for application/xhtml+xml is not to use a doctype at all. This way the page cannot be “strictly conforming” XHTML 1.0, but that does not matter. (Please see the Addendum below.)
IE8, IE9, IE10, and IE11 Complications
It was announced on A List Apart that IE8 would use a meta element-based mode switch in addition to doctype being a factor in the mode choice. (See commentary by Ian Hickson, David Baron, David Baron again, Robert O’Callahan and Maciej Stachowiak.)
IE8 has four modes: IE 5.5 quirks mode, IE 7 standards mode, IE 8 almost standards mode and IE 8 standards mode. IE9 has seven modes: IE 5.5 quirks mode, IE 7 standards mode, IE 8 almost standards mode, IE 8 standards mode, IE 9 almost standards mode, IE 9 standards mode and IE 9 XML mode. IE10 has eleven modes: IE 5.5 quirks mode, IE 7 standards mode, IE 8 almost standards mode, IE 8 standards mode, IE 9 almost standards mode, IE 9 standards mode, IE 9 XML mode, IE 10 quirks mode, IE 10 almost standards mode, IE 10 standards mode and IE 10 XML mode. The choice of mode depends on data from various sources: doctype, a meta element, an HTTP header, periodically downloaded data from Microsoft, the intranet zone, settings made by the user, settings made by an intranet administrator, the mode of the frame parent if any and a UI button togglable by the user. (With other apps that embed the engine, the mode also depends on the embedding application.)
The lucky thing is that IE8 and IE9 use doctype sniffing roughly like other browsers and IE10 uses doctype sniffing exactly like other browsers if all the following points are true:
- There is no
X-UA-CompatibleHTTP header set by the author. - There is no
X-UA-Compatiblemetatag set by the author. - Microsoft has not placed the domain name of the site on the list of exceptions.
- An intranet admin has not placed the site on the list of exceptions.
- The user has not pressed the Compatibility View button (or otherwise added the domain to a user-specific list of exceptions). (Metro IE10 does not have this UI, but the UI in desktop IE10 affects the behavior in the Metro mode also.)
- The site is not in the intranet zone.
- The user has not chosen to display all sites as in IE7.
- The page is not framed by a Compatibility Mode page.
For the points other than the two X-UA-Compatible cases, IE8 and IE9 perform doctype sniffing like IE7. The IE7 emulation is called Compatibility View.
In the X-UA-Compatible cases, IE8 and IE9 behave radically differently from other browsers. For the behavior of IE8, please see an appendix on this page or a flowchart available in PDF and PNG formats. (Contrast with the chart for other browsers as PDF.) There is also a unified chart of IE 5.5 through 9 (potentially with Chrome Frame) modes as PDF.
Unfortunately, without an X-UA-Compatible HTTP header or meta tag, IE8 and IE9 let the user accidentally drop your page from their most standards mode to the IE7 mode that emulates the standards mode of IE7 even if you used a proper doctype. Worse, an intranet admin may do this. Also, Microsoft may have put the entire domain you use (e.g. mit.edu!) on the list of exceptions.
To counter these effects, a doctype isn’t enough and you need an X-UA-Compatible HTTP header or meta tag.
Hereare simple guidelines for choosing anX-UA-Compatible HTTP header or meta tag for a new text/html document that already has a doctype that triggers the standards mode or almost standards mode in other browsers:
You don’t need to include an X-UA-Compatible HTTP header or meta tag.
Include either the following meta element on your page <meta http-equiv='X-UA-Compatible'> (before any script elements!) or set the following HTTP header on your page: X-UA-Compatible: IE=Edge
First, include either the following meta element (which in invalid in HTML5) on your page <meta http-equiv='X-UA-Compatible'> (before any script elements!) or set the following HTTP header on your page: X-UA-Compatible: IE=EmulateIE7
Then fix your site not to rely on non-standard IE7 behaviors and migrate to IE=Edge.
First, include either the following meta element (which in invalid in HTML5) on your page <meta http-equiv='X-UA-Compatible'> (before any script elements!) or set the following HTTP header on your page: X-UA-Compatible: IE=EmulateIE8
Then fix your site not to rely on non-standard IE8 behaviors and migrate to IE=Edge.
First, include either the following meta element (which in invalid in HTML5) on your page <meta http-equiv='X-UA-Compatible'> (before any script elements!) or set the following HTTP header on your page: X-UA-Compatible: IE=EmulateIE9
Then fix your site not to rely on non-standard IE8 behaviors and migrate to IE=Edge.
Google Chrome Frame Complications
Google Chrome Frame is a combination of a browser extension and browser plug-in for IE 6, 7, 8 and 9 that adds the engine of Google Chrome into the user interface shell of IE using the networking stack that IE uses. After installation, IE behaves normally by default. However, Web pages can opt to invoke the engine of Chrome instead of the engine of IE using an X-UA-Compatible HTTP header or meta tag.
Specifying chrome=1 in X-UA-Compatible invokes Chrome Frame in any supported version of IE if Chrome Frame is installed. Specifying chrome=IE6 activates Chrome Frame in IE6 only, specifying chrome=IE7 activates Chrome Frame only in IE7 and IE6, and chrome=IE8 activates Chrome Frame only in IE8 and lower.
The directive for activating Chrome Frame can be combined with the directives for controlling the engine of IE (in case Chrome Frame is not installed) by separating them with a comma or a semicolon: <meta http-equiv='X-UA-Compatible'>.
Once the Chrome Frame has been activated for a page, one of the four modes (Standards, Almost Standards, Quirks and XML) of Chrome is chosen as in normal Chrome.
Google Chrome Frame was discontinued years ago. You should not try to accommodate it. It is mentioned here only for historical completeness.
Links to Related Pages
- Eric Meyer writes about themodes of Mac IE 5 in Usethe Right Doctype
- Mozilla’sDOCTYPE sniffingby David Baron
- CSSEnhancements in Internet Explorer 6by Lance Silverdiscusses the modes and doctype sniffing in Windows IE 6
- Faruk Ateş writes about IE8 in IE8 and the X-UA-Compatible situation
Addendum: A Plea toImplementors and Spec Writers Working with XML
Please don’t bring doctypesniffing to XML.
Doctype sniffing is a tag soupsolution to a tag soup problem.Doctype sniffing was devised afterthe HTML 4 and CSS2 specshad been written as a heuristicway to distinguish legacydocuments from documents whose authors might expect conformingbehavior.
Sometimes it is suggested thatdoctype sniffing be used on the XMLside as well for dispatching to different handlers, for recognizing thevocabulary in use, or for activating features. This is a bad idea.Dispatching and vocabulary recognition should be based on namespacesandfeature activation should be based on explicit processing instructionsor elements.
The whole concept ofwell-formedness was introduced to allow DTDlessparsing of XML and, by extension, doctypeless documents. In formalterms, if two XML documents have the same canonical form and an apptreats them differently (and the difference is not due to opting not toprocess external entities), chances are the app is broken. In practicalterms, if two XML documents cause the same content to be reported(qnames ignored) to SAX2 ContentHandlerand an app treats the documents differently, chances are the app isbroken. Considering that as a Web author you cannot trust that everyoneparsing your pages uses an XML processor that resolves externalentities (even if some browsers appear to do so because they map certain public ids to an abridged DTD for entity definitions), inserting a doctype in XML intended for the Web ismostly pointless and often done out of a cargo cultish habit. (You canstill validate against a DTD using the DTD override feature of theW3C Validator, although the W3C Validator will say that the result is only tentatively valid. Or better yet, you can use RELAX NG validation, which does not pollute the document with schema references.) Requiring a doctype only for sniffing would be silly, even though that is the situation with HTML in practice.
Moreover, when a lower-levelspec defines two things that areequivalent, a higher-level spec should not try to give differentmeanings to the two things. Consider <!DOCTYPEhtml PUBLIC'-//W3C//DTD XHTML 1.0 Strict//EN'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>.If thepublic identifier is removed, the same DTD is still designated and,therefore, the doctype <!DOCTYPEhtml SYSTEM'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>meansthe same as the previous doctype. Should they be sniffed differently?The idea can be carried further. Suppose the DTD is copied toexample.com and named foobar.dtd: <!DOCTYPEhtml SYSTEM'http://example.com/foobar.dtd'>.How could that one besniffed? The meaning is the same. The whole DTD could even be pastedinline!
To put it another way, if youhave #include 'foo.h',you should not bind any black magic to the name foo.h,because it should be permissible to paste the contents of foo.hinline or copy the contents of foo.hto bar.hand say #include 'bar.h'.
The reason I don’t bothermaking the same argument with HTML andSGML is that Web browsers don’t use real SGML parsers for parsing HTML,so I don’t think it is useful to pretend that SGML is being dealtwith. However, if you are not convinced yet, please see W. Eliot Kimber’s comp.text.sgml post about the matter (link blocked by Google as of January 2020).
Note: IE10 and IE11 have a processing instruction for requesting IE9 behavior in IE10 and IE11 or IE10 behavior in IE11 for XML.
Edge Emulate Ie11 Software
Appendix: Handling of Some Doctypes in text/html
In the following table, QuirksMode, Standards Mode and Almost Standards Mode are denoted by Q, S andA, respectively. When a browser only has two modes, the Standards Modeis marked as “S”, if the line height in table cells works as inMozilla’s Standards Mode, and as “A”, if the line height in table cellsworks as in Mozilla’s Almost Standards Mode.
Please note that XHTML served using an XMLcontent type is rendered in the XML mode.
The purpose of this table is not to suggest that all the doctypes listed in the table are reasonable choices for new pages. The purpose of this table is to show what data I am basing my recommendations on.
The following shorthandnotation is used in the column headers:
- NS6
- Mozilla 0.6…0.9.4and Netscape 6.0…6.2.3
- Old Moz
- Mozilla 0.9.5through1.1 alpha and Mozilla 1.0
- Moz & Safari & Chrome & Edge & Opera 10 & IE10 & IE11 & HTML5
- Mozilla 1.0.1,Mozilla 1.1 beta and later, Firefox, Netscape 7 and later, Safari 0.9 and later, Opera 10 and later, Chrome, Edge, Konqueror 3.5, IE10, IE11, the HTML5 specified behavior (IE10 and IE11 Quirks means the interoperable Quirks mode rather than the IE 5.5 mode)
- Opera 9.0
- Opera 9.0…9.20
- IE 8, IE 9 & Opera 9.5
- IE 8 or IE 9 by default when there is no
X-UA-Compatibleoverride nor a Compatibility View override (“A” means the IE8 Almost Standards mode for IE8 and IE9 Almost Standards mode for IE9), Opera 7.5…8.54 and 9.5…9.6 - IE 7 & Opera 7.10
- Windows IE 7, IE 8 with Compatibility View enabled but without
X-UA-Compatibleoverride (in this case “A” means the IE7 mode) and Opera 7.10…7.23 - IE 6 & Opera 7.0
- Windows IE 6 and Opera7.0…7.03
- Mac IE 5
- Mac IE 5.0…5.2.3
- Konq 3.2
- Konqueror 3.2.2…3.3(possibly also 3.1…3.2.1; I have not been able to confirm)
| Doctype | NS6 | OldMoz | Moz & Safari & Chrome & Edge & Opera 10 & IE10 & IE11 & HTML5 | Opera 9.0 | IE 8, IE 9 & Opera 9.5 | IE 7 & Opera7.10 | IE6& Opera 7.0 | MacIE 5 | Konq3.2 |
|---|---|---|---|---|---|---|---|---|---|
| None | Q | Q | Q | Q | Q | Q | Q | Q | Q |
<!DOCTYPE html> | Q | S | S | S | S | A | A | A | |
<!DOCTYPE html SYSTEM 'about:legacy-compat'> | ? | ? | ? | ? | ? | ? | ? | ? | |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 3.2 Final//EN'> | Q | Q | Q | Q | Q | Q | Q | Q | Q |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.0//EN'> | S | S | S | S | S | A | A | A | A |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.01//EN'> | S | S | S | S | S | A | A | Q | A |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.0//EN'http://www.w3.org/TR/html4/strict.dtd'> | S | S | S | S | S | A | A | A | A |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.01//EN'http://www.w3.org/TR/html4/strict.dtd'> | S | S | S | S | S | A | A | A | A |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'> | Q | Q | Q | Q | Q | Q | Q | Q | Q |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'> | Q | Q | Q | Q | Q | Q | Q | Q | Q |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'http://www.w3.org/TR/html4/loose.dtd'> | S | S | A | A | A | A | A | A | Q |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd'> | Q | S | A | A | A | A | A | A | Q |
<!DOCTYPEHTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'http://www.w3.org/TR/html4/loose.dtd'> | Q | Q | Q | Q | A | A | A | A | Q |
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'> | S | S | S | S | S | A | A | A | A |
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML Basic 1.0//EN' 'http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd'> | S | S | S | S | S | A | A | A | A |
<!DOCTYPEhtml PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> | S | S | S | S | S | A | A | A | A |
<!DOCTYPEhtml PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> | S | S | A | A | A | A | A | A | Q |
<?xmlversion='1.0' encoding='UTF-8'?> | S | S | S | S | S | A | Q | A | Q |
<?xmlversion='1.0' encoding='UTF-8'?> | S | S | S | S | S | A | Q | A | Q |
<?xmlversion='1.0' encoding='UTF-8'?> | S | S | S | S | S | A | Q | A | Q |
<?xmlversion='1.0' encoding='UTF-8'?> | S | S | A | A | A | A | Q | A | Q |
<!DOCTYPEHTML PUBLIC 'ISO/IEC 15445:2000//DTD HTML//EN'> | Q | S | S | Q | Q | Q | Q | Q | Q |
<!DOCTYPEHTML PUBLIC 'ISO/IEC 15445:2000//DTD HyperText MarkupLanguage//EN'> | Q | S | S | S | S | A | A | A | Q |
<!DOCTYPEHTML PUBLIC 'ISO/IEC 15445:1999//DTD HTML//EN'> | S | S | S | Q | Q | Q | Q | Q | Q |
<!DOCTYPEHTML PUBLIC 'ISO/IEC 15445:1999//DTD HyperText MarkupLanguage//EN'> | S | S | S | S | S | A | A | A | Q |
Historical Notes
Mozilla’s doctype sniffing codehas changed substantially in October 2000, in September 2001 and inJune 2002. This document describes the situation with Mozilla buildsmade available at ftp.mozilla.org on 2000-10-19 and later (and withNetscape 6.x). This document does not address the way doctype sniffingworked in Mozilla M18 (and Netscape 6.0 PR3). Safari’s doctype sniffingcode has also changed substantially since the first public beta. Thisdocument does not cover the behavior of versions earlier than v73 aka.0.9.
Konqueror’s doctype sniffing code prior to version 3.5 appears to come from a very early version of Safari. Konqueror now matches Safari whose doctype sniffing code comes from Mozilla.
As can be seen from the table, Opera’s doctype sniffing has gradually moved from being IE-like to towards being Mozilla-like, although Opera 9.5 and 9.6 regressed on the way. At the same time, the layout behavior of Opera’s Quirks mode has shifted from imitating the Quirks mode of IE 6 towards the Quirks mode of Mozilla.
Appendix: IE8’s Mode Selection
Start: Go to “X-UA-Compatible meta?”.
- X-UA-Compatible
meta? - IE=7: Use IE7 Standards.
- IE=EmulateIE7: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- IE=IE8 or IE=IE7 or IE=a or IE=EmulateIE8 or absent or has
scriptfirst: Go to “X-UA-Compatible HTTP Header?”. - IE=8 or IE=Edge or IE=99 or IE=9.9: Go to “Almost Standards Doctype?”.
- IE=5: Use Quirks (IE 5.5).
- X-UA-Compatible HTTP Header?
- IE=7: Use IE7 Standards.
- IE=EmulateIE7: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- IE=IE8 or IE=IE7 or IE=a or IE=EmulateIE8 or absent: Go to “Display All Web Sites… Pref Set?”.
- IE=8 or IE=Edge or IE=99 or IE=9.9: Go to “Almost Standards Doctype?”.
- IE=5: Use Quirks (IE 5.5).
- Quirky or No Doctype? (Compatibility Mode)
- Yes: Use Quirks (IE 5.5).
- No: Use IE7 Standards.
- Display All Web Sites… Pref Set?
- Yes: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- No: Go to “Display Intranet Sites… Pref Set?”.
- Display Intranet Sites… Pref Set?
- Yes: Go to “Is the site in the Intranet Zone?”.
- No: Go to “Domain on MS-Maintained List?”.
- Is the Site in Intranet Zone?
- Yes: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- No: Go to “Domain on MS-Maintained List?”.
- Domain on MS-Maintained List?
- Yes: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- No: Go to “Framed by Compatibility Mode page?”.
- Framed by Compatibility Mode page?
- Yes: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- No: Go to “Compatibility Mode Button Pressed?”.
- Compatibility Mode Button Pressed?
- Yes: Go to “Quirky or No Doctype? (Compatibility Mode)”.
- No: Go to “Quirky or No Doctype? (IE8)”.
- Quirky or No Doctype? (IE8)
- Yes: Use Quirks (IE 5.5).
- No: Go to “Almost Standards Doctype?”.
- Almost Standards Doctype?
- Yes: Use IE8 Almost Standards.
- No: Use IE8 Standards.
The steps are available as a flowchart in PDF and PNG formats.
Acknowledgments
Thanks to Simon Pieters, Lachlan Hunt and Anne van Kesteren for their help with correcting the mode table for various Opera versions and for their comments. Thanks to Simon Pieters for the text alternative for the IE8 flowchart.
