Dorward's Ramblings

Quirks or Standards Mode Bookmarklet

Published on

These days, many browsers can function in Standards Mode and Quirks Mode. In a nutshell, they perform an intelligence test based on the document author's choice (or lack thereof) of Doctype. If they see a "good" Doctype, they enter Standards mode and more closely follow standards, otherwise they enter Quirks and … don't.

For example, in Quirks mode, Internet Explorer incorrectly treats the CSS width property as "The distance between the outside edges of the borders" while in Standards mode it treats it as "The distance between the inside edges of the padding". In Quirks mode it assumes pixel units for lengths which have missing units, but in Standards mode it follows the specification for error handling and ignores the property with the invalid value.

More information on the subject can be found at Doctype switching and standards compliance: An overview.

It isn't always obvious which rendering mode a browser is in. This bookmarklet may help you determine which mode a document is in.

QorS Mode