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

HTML meta http-equiv Attribute

HTML The http-equiv attribute

HTML meta Tag Reference HTML tag

Example

Refresh the document every 30 seconds:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the http-equiv attribute.


Definition and Usage

The http-equiv attribute provides an HTTP header for the content information/value of the attribute.

The http-equiv attribute can be used to simulate an HTTP response header.


Differences between HTML 4.01 and HTML5

Using http-equiv is no longer the only way to specify the character set of an HTML document:


Syntax

Attribute values

Value Description
content-type Specifies the character encoding of the document.

Example:

default-style Specifies the preferred stylesheet to use.

Example:

Note:The value of the content attribute above must match the value of the title attribute on a link element in the same document, or the value of the title attribute on a style element in the same document.

refresh Defines the time interval after which the document is automatically refreshed.

Example:

Note: The value "refresh" should be used with caution because it can take control of the page away from the user. In W3C's Web Content Accessibility Guidelines using "refresh" results in a failure.


HTML meta Tag Reference HTML tag