css – How do I know if Quirks mode was triggered within IE6? – Education Career Blog

I read that if the DOCTYPE is not corectly set IE6 will enter Quirks mode.

I have given a document HTML 4.01 Transitional, but how do I know if IE6 triggers Quirks mode or not?


create a bookmark with the following link:

javascript:m=(document.compatMode==’CSS+Compat’)?’Standards.’:’Quirks’;window.alert(‘You are in ‘ + m + ‘ mode.’);


Look at document.compatMode

<script type="text/javascript" charset="utf-8">
  if(document.compatMode == 'CSS1Compat'){
    alert("Standards mode");
    alert("Quirks mode");


If you look at the end of the address bar, there is a little “broken page” icon that shows whether you are in quirks mode, or “proper” mode!

You can also get this using JavaScript by querying…


Leave a Comment