all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

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" ... >
JavaScript

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

A Windows Store app using JavaScript for Windows XP SP2. 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

A Windows Store app using JavaScript for Windows XP SP2. 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

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 Windows 8, you can specify the following values for use with Windows Runtime apps using JavaScript:

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 a Windows Store app using JavaScript to display a document in a Windows Store app using JavaScript, if possible.


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

See also

Reference
httpEquiv
meta
Conceptual
Defining Document Compatibility

 

 

Show:
© 2014 Microsoft