There are now three modes used by the layout engines in web browsers: quirks mode, almost standards mode, and full standards mode.
- In quirks mode, layout emulates nonstandard behavior in Navigator 4 and Internet Explorer 5. This is essential in order to support websites that were built before the widespread adoption of web standards.
- In full standards mode, the behavior is (hopefully) the behavior described by the HTML and CSS specifications.
- In almost standards mode, there are only a very small number of quirks implemented.
For HTML documents, browsers use a DOCTYPE
in the beginning of the document to decide whether to handle it in quirks mode or standards mode.