This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
The <meta> HTML element represents metadata that cannot be represented by other meta-related elements, such as <base>, <link>, <script>, <style>, or <title>.
The type of metadata provided by the <meta> element can be one of the following:
name attribute is set, the <meta> element provides document-level metadata that applies to the whole page.http-equiv attribute is set, the <meta> element acts as a pragma directive to simulate directives that could otherwise be given by an HTTP header.charset attribute is set, the <meta> element is a charset declaration, giving the character encoding in which the document is encoded.itemprop attribute is set, the <meta> element provides user-defined metadata.This element includes the global attributes.
Note: The name attribute has a specific meaning for the <meta> element. The itemprop attribute must not be set on a <meta> element that includes a name, http-equiv, or charset attribute.
charsetThis 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. <meta> elements which declare a character encoding must be located entirely within the first 1024 bytes of the document.
contentThis attribute contains the value for the http-equiv or name attribute, depending on which is used.
http-equivDefines a pragma directive, which are instructions for the browser for processing the document. The attribute's name is short for http-equivalent because the allowed values are names of equivalent HTTP headers.
mediaThe media attribute defines which media the theme color defined in the content attribute should be applied to. Its value is a media query, which defaults to all if the attribute is missing. This attribute is only relevant when the element's name attribute is set to theme-color. Otherwise, it has no effect, and should not be included.
nameThe name and content attributes can be used together to provide document metadata in terms of name-value pairs, with the name attribute giving the metadata name, and the content attribute giving the value.
The following <meta> tag provides a description as metadata for the web page:
<meta name="description" content="The HTML reference describes all elements and attributes of HTML, including global attributes that apply to all elements." />
The following example uses http-equiv="refresh" to direct the browser to perform a redirect. The content="3;url=https://www.mozilla.org" attribute will redirect page to https://www.mozilla.org after 3 seconds:
<meta http-equiv="refresh" content="3;url=https://www.mozilla.org" />
| Content categories | Metadata content. If the itemprop attribute is present: flow content, phrasing content. |
|---|---|
| Permitted content | None; it is a void element. |
| Tag omission | Must have a start tag and must not have an end tag. |
| Permitted parents |
|
| Implicit ARIA role | No corresponding role |
| Permitted ARIA roles | No role permitted |
| DOM interface | HTMLMetaElement |
| Specification |
|---|
| HTML> # the-meta-element> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
meta |
1 | 12 | 1 | ≤12.1 | 1 | 18 | 4 | ≤12.1 | 1 | 1.0 | 4.4 | 1 |
charset |
1 | 12 | 1 | 15 | 3 | 18 | 4 | 14 | 2 | 1.0 | 4.4 | 2 |
content |
1 | 12 | 1 | ≤12.1 | ≤4 | 18 | 4 | ≤12.1 | ≤3.2 | 1.0 | 4.4 | ≤3.2 |
http-equiv |
1 | 12 | 1 | ≤12.1 | ≤4 | 18 | 4 | ≤12.1 | ≤3.2 | 1.0 | 4.4 | ≤3.2 |
name |
1 | 12 | 1 | ≤12.1 | ≤4 | 18 | 4 | ≤12.1 | ≤3.2 | 1.0 | 4.4 | ≤3.2 |
scheme |
1 | 12 | 1 | ≤12.1 | ≤4 | 18 | 4 | ≤12.1 | ≤3.2 | 1.0 | 4.4 | ≤3.2 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta