HTML / Element / Initial coverage

The <meta> Element

Status: Initial coverage Scope: HTML Living Standard Checked: 2026-10-04

Key points

meta associates document-level information with a page; it does not display page content. charset, name, http-equiv, and itemprop select different meanings and processing models.

Similar-looking values can be processed by different specifications, including HTTP response headers, HTML metadata names, CSS Viewport, and CSP. Check the relevant specification and when its processing applies.

Purpose and attribute model

meta can represent document metadata, a pragma directive, or an encoding declaration in serialized HTML. It has no displayed content of its own and is usually placed in head. Microdata can use an itemprop meta element in the body under the relevant placement rules.

Attributes that select the meaning and their main conditions
AttributePurposeMain condition
charsetDeclares the document's character encodingThe value is UTF-8; do not add more than one declaration per document
name + contentStores document metadata as a name and valueEach metadata name defines its own valid values and meaning
http-equiv + contentSelects a standardized pragma directiveIt is not a general replacement for HTTP headers
itemprop + contentProvides a Microdata property valuePlacement also depends on Microdata rules

Conforming markup uses one of these four identifying attributes on a given element. name, http-equiv, and itemprop also require content. Keep authoring conformance separate from how a browser processes non-conforming markup.

charset and encoding determination

<head>
  <meta charset="utf-8">
  <title>Page title</title>
</head>

The charset value must ASCII case-insensitively match utf-8. A conforming in-document declaration must be completely within the first 1024 bytes. This lets the parser inspect the start of the file to help decode its text.

The parser can have earlier encoding information, such as a byte order mark (BOM) or a charset in the HTTP response's Content-Type. The in-document declaration alone does not prove which encoding the browser used. When these sources disagree, inspect both the response and the document.

The HTML Standard requires an encoding declaration in an HTML document without a BOM or encoding explicitly supplied by HTTP metadata, except for an iframe srcdoc document.

name and content

name identifies a kind of metadata; content supplies its value. The HTML Standard defines names with different value formats, duplicate rules, and user-agent processing.

Example nameStandard roleBoundary to check
descriptionA short description of the pageA search service may use it, but its snippet display or ranking is not guaranteed
referrerThe document's default referrer policyInteraction with Referrer Policy, response headers, and later insertion or changes
theme-colorA candidate color for user-agent interface around the pageValid color, optional media condition, and browser UI support
color-schemeDeclares color schemes the document can handleInteraction with CSS Color Adjustment, rendering, and form controls

viewport is handled as a mobile layout viewport mechanism in the CSS Viewport family of specifications. Do not assume it follows the same processing model as the ordinary metadata names defined by HTML; device and browser differences need separate tests. Open Graph names such as og:* come from an external vocabulary, not from HTML alone.

http-equiv and response headers

http-equiv selects pragma directives defined by HTML. Its name contains “http”, but it is not a general mechanism for replacing HTTP response headers.

  • content-security-policy applies to the document after the parser reaches the meta element. It cannot act retroactively on earlier content. Directives such as frame-ancestors, sandbox, and report-uri are removed from a policy delivered by meta. Content-Security-Policy-Report-Only is not supported there. A response header is the preferred way to deliver a security policy.
  • refresh can cause a reload or navigation. Its runtime behavior should be checked in an isolated fixture rather than by relying on a live page.
  • Some directives, such as content-language, have historical dynamic processing rules. Do not infer the result after insertion or removal from the initial markup alone.

Some directive keywords are ASCII case-insensitive, but each directive's value and processing time still need their own check.

DOM interface

In an HTML document, the element is exposed as HTMLMetaElement. Its DOM properties are an entry point for inspecting markup attributes. They do not reveal HTTP response headers or prove the user agent's final behavior.

const description = document.querySelector('meta[name="description"]');

description instanceof HTMLMetaElement;
description.name;
description.content;
description.getAttribute("content");

Specification claims and evidence

Claims, conditions, and verification state are kept separate. Browser implementation, WPT, and accessibility API results are recorded below as Implementation Evidence.

Key normative claims
TypeClaimConditions and scopeStateSource
SPECmeta represents metadata, a pragma directive, or a character encoding declaration.The meaning depends on the identifying attribute used.ReviewedHTML Standard: meta element
SPECConforming markup chooses one of the four identifying attributes on a given meta element.name, http-equiv, charset, or itemprop. Attribute omission and processing of non-conforming markup are separate questions.ReviewedHTML Standard: meta element
SPECAn in-document encoding declaration uses UTF-8 and must be complete within the first 1024 bytes.Authoring conformance. The actual decoding algorithm also checks BOM and transport metadata.ReviewedHTML Standard: character encoding declaration
SPECCSP delivered by meta does not have the same scope, timing, and directives as an HTTP response header.Response headers are preferred; content before the meta policy is parsed is not protected by that policy.ReviewedContent Security Policy: HTML meta element

Evidence

  1. HTML Standard: The meta element — attribute model, metadata, and pragma directives
  2. HTML Standard: Character encoding declaration — UTF-8 declaration and placement
  3. HTML Standard: Determining the character encoding — parser decoding steps and precedence
  4. Content Security Policy: HTML meta element — boundaries for CSP delivered by meta
  5. HTML Accessibility API Mappings 1.0: meta — role and platform mappings
  6. CSS Viewport Module Level 1: viewport meta — viewport descriptor processing

Browser, WPT, and AAM observations

Standards text and measurements are kept separate. We measured a limited fixture and selected WPT files in Chromium-based browsers, and inspected the native Windows UI Automation tree in Edge. The HTML-AAM table and Browser accessibility trees are recorded separately from Windows UIA. NVDA speech remains unmeasured because its spoken output could not be captured.

Measurement status: WPT covers five selected files, and Firefox was not used. The WPT upstream revision was not pinned. Windows UIA was measured in Edge, but NVDA speech output remains unchecked, so AAM coverage is partial.

meta element implementation evidence register
TypeScope checkedConditions and recordState
IMPL Document character encoding, HTMLMetaElement IDL values, the itemprop attribute, and the used scheme selected by color-scheme 2026-10-04 / Windows 11 Pro build 26300. Measured build-config/yugien/research-results/meta-v1/ in Codex In-app Browser (Chrome UA 154.0.0.0, viewport 1280×720 / DPR 1.25) and Edge (UA Edg/154.0.0.0, viewport 1028×624 / DPR 1.25). The fixture response used Content-Type: text/html with no charset parameter; the document starts with <meta charset="utf-8">. Both reported document.characterSet as UTF-8. Checked the name, content, httpEquiv, and media IDL values, the charset attribute, and the body itemprop attribute. In both, charset was available as an attribute but there was no charset IDL property on the element. With color-scheme=dark, the used root scheme was dark; changing it to light changed the used scheme to light. The six head and one body meta elements did not appear as individual Browser accessibility-tree nodes. Chromium-based environments only; Firefox, Safari, other versions, and devices were not observed. Partial measurement (Chrome 154 / Edge 154)
WPT Five selected test files for color-scheme changes and tree order, http-equiv / name interaction, and ASCII case-insensitive directive keywords 2026-10-04 / Windows 11 Pro build 26300 / Codex In-app Browser (Chrome UA 154.0.0.0) and Edge (UA Edg/154.0.0.0) / wpt.live. Both browsers reported Harness status OK. meta-color-scheme-attribute-changes.html (8/8), http-equiv-and-name-1.html (1/1), http-equiv-and-name-2.html (1/1), meta-color-scheme-first-valid-applies.html (1/1), and http-equiv-enumerated-ascii-case-insensitive.html (1/1). Chrome passed 12/12, Edge passed 12/12; 24/24 selected test cases passed in total. wpt.live did not expose its upstream revision, so no commit was pinned. The full directory, other browser engines, and other versions were not run.

The test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version.

Partial run (Chrome / Edge each passed 12/12)
AAM HTML-AAM meta mapping, the Edge Windows UIA tree, and Chrome / Edge Browser accessibility trees. NVDA speech remains unmeasured HTML-AAM Editor’s Draft (2026-07-29), section 3.5.92 meta mapping: no corresponding WAI-ARIA role; Computed Role, UIA, MSAA+IA2, ATK/AT-SPI, and AX are Not mapped. 2026-10-04 / Windows 11 Pro build 26300 / Edge UA Edg/154.0.0.0. Read the native Windows UIA tree with System.Windows.Automation: the page was exposed as ControlType.Document, with Hyperlink, Text, Table, List, ListItem, Group, and DataItem descendants. The six head and one body meta elements were not exposed as individual UIA element nodes; visible words that mention “meta” were ordinary page text. Chrome and Edge Browser accessibility trees exposed the web area, headings, tables, links, and text, but no meta element nodes. NVDA was available and started, but its spoken output was not captured, so assistive-technology speech remains unmeasured. Firefox was not used; other browsers remain untested. Partial check (Edge UIA / Browser trees; NVDA unmeasured)

Checked scope and open questions

  • SPECHTML Standard attribute model, encoding declaration, and main metadata/pragma boundaries.
  • AAM SPECHTML-AAM role and platform mappings for meta are in scope.
  • Assistive technologyNVDA speech and navigation order, plus Windows UIA trees in other browsers, remain unmeasured.
  • ViewportCSS Viewport width, zoom, interactive-widget, and browser/device differences need separate measurements.
  • Metadata vocabulariesOpen Graph, search-service snippet selection, and non-standard name values are outside HTML Standard definitions.

Related pages

For a short introduction and examples, see the meta element in Yugien. For the relationship between a document and external resources, see the link element. The page title is defined by the title element in the HTML Standard.