For Dummies - Difference between Standards and Quirks mode
In "Standards" mode browser tries to render the web page content by following HTML and CSS specifications; while in "Quirks" mode, it tries to duplicate its own older version (backward compatibility mode).
The simplest way to switch the browser between the two modes is by toggling the existence of a valid DOCTYPE declaration.
Please note: For putting all versions of IE into "Standards" mode, the DOCTYPE declaration must start on line 1 char 1. Even a single whitespace character preceding this declaration puts all IEs into "Quirks" mode.
There also exists a third compatibility mode called "Almost Standards" which adheres to CSS2 specs for vertical sizing of table cells. This mode exactly behaves like "Standards" except the layout of 'images inside table cells' follows "Quirks" mode.
You can verify the current compatibility mode by just checking the DOM extension document.compatMode.
This returns "CSS1Compat" for "Standards" and "Almost Standards" modes; while for "Quirks" mode, it returns "BackCompat".
Try this from your browser's address bar: javascript:alert(document.compatMode);