content attribute | content property (Internet Explorer)

Switch View :
ScriptFree
content attribute | content property

Gets or sets meta-information to associate with httpEquiv or name.

HTML 4.01 Specification, Section 7.4.4

Syntax

HTML<element content="p" ... >
JScript

p = object.content

Property values

Type: String

description

Meta-information.

refresh

Integer consisting of the number of seconds to elapse before the document is refreshed. This value requires the httpEquiv to be set with the refresh value.

url

Location that is loaded when the document is refreshed. This value requires the httpEquiv to be set with the refresh value.

mimetype

MIME type used for the charset value.

charset

Character set of the document. This value requires the mimetype value to be set with a valid MIME type, and the httpEquiv to be set with the refresh value.

noopen

Internet Explorer 6 for Windows XP SP2 and later. Hides the Open or Run button on the File Download dialog box. This value requires the name attribute to be set with the DownloadOptions value.

nosave

Internet Explorer 6 for Windows XP SP2 and later. Hides the Save button on the File Download dialog box. This value requires the name attribute to be set with the DownloadOptions value.

x-ua-compatible

Internet Explorer 8 and later. A comma–delimited list of document compatibility modes supported by the web page. Note that Internet Explorer attempts to display the document in order of the values presented. This value requires the httpEquiv to be set with the x-ua-compatible value.

Standards information

Remarks

Developers using the httpEquiv and content attributes to refresh documents from alternate URLs should treat the value of content as untrusted data. For more information, please see Security Considerations: Dynamic HTML.

As of Internet Explorer 8, the httpEquiv attribute also supports a value of x-ua-compatible, which allows developers to specify the document compatibility mode that Internet Explorer should use to display a webpage. To do this, set the content attribute to a String value containing a comma-delimited list of one or more of the following values.

ValueDescription
IE=9The webpage is displayed in IE9 Standards mode.
IE=8The webpage is displayed in IE8 Standards mode.
IE=7The webpage is displayed in IE7 Standards mode.
IE=5The webpage is displayed in IE5 (Quirks) mode.
IE=EmulateIE9If the webpage specifies a standards-based doctype directive, the page is displayed in IE9 mode; otherwise, it is displayed in IE5 mode.
IE=EmulateIE8If the webpage specifies a standards-based doctype directive, the page is displayed in IE8 mode; otherwise, it is displayed in IE5 mode.
IE=EmulateIE7If the webpage specifies a standards-based doctype directive, the page is displayed in IE7 mode; otherwise, it is displayed in IE5 mode.
IE=EdgeThe webpage is displayed in the highest mode available to the version of Internet Explorer used to view the page. This option is generally intended for testing purposes.

 

When the content attribute specifies multiple document modes, Internet Explorer displays the page in the highest mode supported by the browser. For more information, see Defining Document Compatibility.

Examples

This example causes the browser to reload the document every two seconds.


<meta http-equiv="refresh" content="2">

This example sets the character set for the document.


<meta http-equiv="Content-Type"

      content="text/html; charset=utf-8">

This example disables theme support for the document.


<meta http-equiv="msthemecompatible" content="no">

This example tells Internet Explorer to display a document in IE9 mode, if possible.


<meta http-equiv="X-UA-Compatible" content="IE=9">

See also

Reference
httpEquiv
meta
Conceptual
Defining Document Compatibility

 

 

Send comments about this topic to Microsoft

Build date: 3/8/2012

Community Content

OhadHalali
<meta http-equiv="X-UA-Compatible" content="IE=8">?
hi i have a simple question,
Does  <meta http-equiv="X-UA-Compatible" content="IE=8"> supported on .NET 3.5?
i tried to set on and nothing heppand...