How to Turn Off the Quirks Mode & Disable It in Internet Explorer With HTML


Quirks mode allows browsers to render HTML and CSS code written in manner that does not conform to standards. The reason for creating a "quirks" mode is that in the beginning, browsers did not all follow W3C -- World Wide Web Consortium -- specifications for standards in Web coding. Quirks mode introduces many bugs that you can avoid by making the browser run in standards mode instead. Browsers render code in quirks mode by default, but adding a proper doctype will fix this situation. Adding "X-UA-Compatible" will also make Internet Explorer use its most up-to-date rendering.

  • Open your Web page in Notepad. Check to see whether the first line of code is an HTML doctype declaration. When a browser sees no doctype, it will go into quirks mode.

  • Change your doctype declaration to one of these two:

    <!DOCTYPE html>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


    The first doctype is for HTML5, though it works with HTML 4 and XHTML code as well. Internet Explorer 8 and above will automatically switch into standards mode when it sees this doctype. The second doctype example works for XHTML in all browsers.

  • Add an "http-equiv" meta tag to the head of your HTML code. Unlike other meta tags, this must go directly below the opening "<head>" tag. This tag will force Internet Explorer to use the most up to date document mode:

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

Related Searches


Promoted By Zergnet



You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!