Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM documentMode property

HTML DOM documentMode property

Document Object Reference Document Object


Definition and Usage

The documentMode property returns the mode in which the browser renders the document.

IE8 renders pages in different ways, based on the !DOCTYPE or certain existing HTML elements.

The return values for these elements are as follows:

Note: If no !DOCTYPE is specified, IE8 renders the page in IE5 mode.

Syntax

document.documentMode


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

documentMode is an IE-specific property supported by IE8 and later IE versions.


Example

Example

Return the mode used by the browser to render the page:

This document is displayed in:

Try it »


Document Object Reference Document Object