Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

How to set IE compatibility mode ?

  • Last Updated : 19 Oct, 2021

The percentage of market share in the global desktop browser of Internet Explorer(IE) is less than 3%. If we are developing a site that includes global users or a sizable number of visitors from an older IE version then we have to make our website compatible with IE, even though that is outdated. The solution to this problem is  X-UA-Compatible mode.

This article will tell you how to set IE(Internet Explorer) using HTML meta tags.

X-UA-Compatible is a document mode meta tag that allows us to choose which version of Internet Explorer the page should be rendered. Information about the http-equiv and content tags can be found at.

Example: This example uses a meta element that includes an X-UA-Compatible header and value of IE=9 in content attribute which limits the webpage features so that the webpage is supported by Windows Internet Explorer 9.

HTML




<!DOCTYPE html>
<html>
<head>
  <title>Your Webpage Title</title>
  <!-- Use Internet Explorer 9 Standards mode -->
  <meta http-equiv="X-UA-Compatible" content="IE=9">
</head>
<body>
  <h>Your Heading</h>
  <p>Your content goes here.</p>
</body>
</html>


The content of the http-equiv tags are below:

  • IE=5: This mode renders the webpage as if it were displayed in Quirks mode by Internet Explorer 7.
  • IE=7: This mode renders content as if it were displayed by Internet Explorer 7
  • IE=8: This mode provides supports for many established standards in the industry.
  • IE=9: This mode provides the highest support for many established industry standards.
              IE 9 does not support CSS3 animations.
  • IE=10: This mode provides the highest support for many established industry standards, like HTML5, CSS3.
  • IE=11: This mode provides the highest support for established and emerging industry standards, like HTML5, CSS3.
  • IE=edge: This mode instructs Internet Explorer to display content in the highest mode available.
  • IE=EmulateIE7: Works same as IE=7 mode if a valid <!DOCTYPE> declaration is present otherwise in Quirks Mode.
  • IE=EmulateIE8: Works same as IE=8 mode if a valid <!DOCTYPE> declaration is present otherwise in Quirks Mode.
  • IE=EmulateIE9: Works same as IE=9 mode if a valid <!DOCTYPE> declaration is present otherwise in Quirks Mode.
  • IE=EmulateIE10: Works same as IE=10 mode if a valid <!DOCTYPE> declaration is present otherwise in Quirks Mode.
  • IE=EmulateIE11: Works same as IE=11 mode if a valid <!DOCTYPE> declaration is present otherwise in Quirks Mode.

Quirks Mode: This mode is a technique used by some browsers in maintaining backward compatibility for pages developed for older browsers, like in our case Internet Explorer.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!