compatMode property (document)
Returns whether rendering works in Quirks or Strict mode.
The rendering mode of a document depends on the doctype declaration and the currently used browser. If rendering works in Strict mode, then the document is rendered according to the W3C standards. This rendering mode can cause problems in older browsers. If the document is rendered in Quirks mode, then the behavior of older browsers is emulated. To get detailed description about the Quirks and Strict modes, visit this page: Quirks mode (Wikipedia)
You can find the related objects in the Supported by objects section below.
This property is read-only.
String that represents the rendering mode.
One of the following values:
|Document is rendered in Quirks mode.|
|Document is rendered in Strict mode.|
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the compatMode property:
Did you find this example helpful?
User Contributed Comments