HTML / CSS / JavaScript Tutorial

HTML Standard attribute: http-equiv

[this page | pdf | back links]

The HTML http-equiv attribute provides the HTTP header for the information / value of an attribute within a <meta> element.


Valid attribute values (when used with <meta>) include:





The character encoding for the document, e.g.:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

Note that using HTML 5 it is now possible to set the character set more directly, using e.g.:

<meta charset="UTF-8">


The preferred style sheet to use for the page, e.g.:

<meta http-equiv="default-style" content="preferred stylesheet">

The value of the relevant content attribute must either match the value of the title attribute of a link element (linked to an external style sheet) or a style element in the same document


The time interval for the document to refresh itself, e.g.

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

It is recommended that this option is used sparingly, since it takes control of the page away from the user. Often better will be to achieve a similar effect using JavaScript


Contents | Prev | Next | HTML Attributes

Desktop view | Switch to Mobile