Export (0) Print
Expand All

compatMode property

Gets a value that indicates whether standards-compliant mode is switched on for the object.

Syntax

HRESULT value = object.get_compatMode(* p);

Property values

Type: BSTR

BackCompat

Standards-compliant mode is not switched on.

CSS1Compat

Standards-compliant mode is switched on.

Remarks

When standards-compliant mode is switched on (also called "strict mode"), Windows Internet Explorer displays the document according to the World Wide Web Consortium (W3C) Cascading Style Sheets (CSS) standard. When standards-compliant mode is not switched on (also called "quirks mode"), the document is displayed as it was displayed in previous versions of Internet Explorer.

The IHTMLDocument5::compatMode property is deprecated in Windows Internet Explorer 8 in favor of the IHTMLDocument6::documentMode property.

With Microsoft Internet Explorer 6 and later, you switch on standards-compliant mode by including the !DOCTYPE declaration at the top of your document, specifying a valid !DOCTYPE in the declaration, and in some cases, specifying the !DOCTYPE or !DOCTYPE. The !DOCTYPE element specifies the unique name of the Document Type Definition (DTD), and can be appended with the version number of the DTD. The !DOCTYPE element specifies the definition of the DTD that is specified in the !DOCTYPE. The !DOCTYPE element specifies the location of the DTD.

See also

Reference
IHTMLDocument6::documentMode
Other Resources
CSS Enhancements in Internet Explorer 6

 

 

Community Additions

ADD
Show:
© 2014 Microsoft