The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.
| Content categories | Metadata content. If the itemprop attribute is present: flow content, phrasing content.
|
| Permitted content | None, it is an empty element. |
| Tag omission | As it is a void element, the start tag must be present and the end tag must not be present. |
| Permitted parents | <meta charset>, <meta http-equiv>: a <head> element. If the http-equiv is not an encoding declaration, it can also be inside a <noscript> element, itself inside a <head> element.
|
| Implicit ARIA role | No corresponding role |
| Permitted ARIA roles | No role permitted
|
| DOM interface | HTMLMetaElement
|
The type of metadata provided by the meta element can be one of the following:
- If the
nameattribute is set, themetaelement provides document-level metadata, applying to the whole page. - If the
http-equivattribute is set, themetaelement is a pragma directive, providing information equivalent to what can be given by a similarly-named HTTP header. - If the
charsetattribute is set, themetaelement is a charset declaration, giving the character encoding in which the document is encoded. - If the
itempropattribute is set, themetaelement provides user-defined metadata.
Attributes
This element includes the global attributes.
Note: the attribute name has a specific meaning for the <meta> element, and the itemprop attribute must not be set on the same <meta> element that has any existing name, http-equiv or charset attributes.
charset- This attribute declares the document's character encoding. If the attribute is present, its value must be an ASCII case-insensitive match for the string "
utf-8", because UTF-8 is the only valid encoding for HTML5 documents.metaelements which declare a character encoding must be located entirely within the first 1024 bytes of the document. content- This attribute contains the value for the
http-equivornameattribute, depending on which is used. http-equivDefines a pragma directive. The attribute is named
http-equiv(alent)because all the allowed values are names of particular HTTP headers:content-security-policyAllows page authors to define a content policy for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.
content-typeDeclares the MIME type and character encoding of the document. If specified, the
contentattribute must have the value "text/html; charset=utf-8". This is equivalent to ametaelement with thecharsetattribute specified, and carries the same restriction on placement within the document. Note: Can only be used in documents served with atext/html— not in documents served with an XML MIME type.default-styleSets the name of the default CSS style sheet set.
x-ua-compatibleIf specified, the
contentattribute must have the value "IE=edge". User agents are required to ignore this pragma.refreshThis instruction specifies:
- The number of seconds until the page should be reloaded - only if the
contentattribute contains a positive integer. - The number of seconds until the page should redirect to another - only if the
contentattribute contains a positive integer followed by the string ';url=', and a valid URL.
Accessibility concerns
Pages set with a
refreshvalue run the risk of having the time interval being too short. People navigating with the aid of assistive technology such as a screen reader may be unable to read through and understand the page's content before being automatically redirected. The abrupt, unannounced updating of the page content may also be disorienting for people experiencing low vision conditions.- MDN Understanding WCAG, Guideline 2.1 explanations
- MDN Understanding WCAG, Guideline 3.1 explanations
- Understanding Success Criterion 2.2.1 | W3C Understanding WCAG 2.0
- Understanding Success Criterion 2.2.4 | W3C Understanding WCAG 2.0
- Understanding Success Criterion 3.2.5 | W3C Understanding WCAG 2.0
- The number of seconds until the page should be reloaded - only if the
nameThe
nameandcontentattributes can be used together to provide document metadata in terms of name-value pairs, with thenameattribute giving the metadata name, and thecontentattribute giving the value.See standard metadata names for details about the set of standard metadata names defined in the HTML specification.
Examples
<meta charset="utf-8">
<!-- Redirect page after 3 seconds -->
<meta http-equiv="refresh" content="3;url=https://www.mozilla.org">
Specifications
| Specification | Status | Comment |
|---|---|---|
| HTML Living StandardThe definition of '<meta>' in that specification. | Living Standard |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
meta
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
charset
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
content
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
http-equiv
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
name
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
Legend
- Full support
- Full support
<meta>: The Document-level Metadata element by Mozilla Contributors is licensed under CC-BY-SA 2.5.