Codectionary / Developer documentation / HTML

<meta>

The <meta> element provides metadata about the HTML document that is not displayed on the page itself — used for things like character encoding, viewport configuration, page descriptions for search engines, and social media preview data. Meta tags live inside the <head> and are void (self-closing) elements.

Syntax

<meta name="description" content="Page description">

Examples

Essential Meta Tags

The meta tags almost every page should include.

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Learn web development with Codectionary.">

Social Media Preview (Open Graph)

Meta tags that control how a link looks when shared on social media.

<meta property="og:title" content="Codectionary - Learn to Code">
<meta property="og:description" content="An interactive platform for learning web development.">
<meta property="og:image" content="https://codectionary.com/preview.png">

SEO and Robots

Controlling how search engines index the page.

<meta name="robots" content="index, follow">
<meta name="keywords" content="html, css, javascript, learn to code">

Attributes

  • charset (string): Declares the document's character encoding, typically UTF-8
  • name (string): Identifies the type of metadata, e.g. viewport, description, author
  • content (string): The value associated with the name or property attribute
  • property (string): Used for Open Graph metadata (og:title, og:image, etc.)

Best practices

  • Always include charset and viewport meta tags as early as possible in <head>
  • Write a unique, concise description for each page (roughly 150-160 characters) to improve search engine snippets
  • Add Open Graph meta tags so links look good when shared on social platforms
  • Do not overload the description with keywords — write for humans first

Browser compatibility

Support applies to the named feature, not every attribute or behaviour in this article. Versions refer to browsers, not operating systems.

Crawler and social-platform interpretation is not browser compatibility; those behaviours remain unknown here.

<meta>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
By 12.1 (possibly earlier)

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 1

Edge

  • From 12

Opera

  • By 12.1 (possibly earlier)

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<meta> charset

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 3
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 2
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 3

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 2

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<meta> name

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
By 12.1 (possibly earlier)

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • By 12.1 (possibly earlier)

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<meta> content

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
By 12.1 (possibly earlier)

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • By 12.1 (possibly earlier)

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
meta — property attribute

Desktop

Chrome
Unknown
Firefox
Unknown
Safari
Unknown
Edge
Unknown
Opera
Unknown

Mobile

Safari on iOS
Unknown
Chrome for Android
Unknown
Firefox for Android
Unknown
Samsung Internet
Unknown

No single verified compatibility record for this topic. Use the feature-specific articles; no browser support is inferred.

<meta> name · viewport

Desktop

Chrome
Not supported
Firefox
Not supported
Safari
Not supported
Edge
Not supported
Opera
Not supported

Mobile

Safari on iOS
Supported
From 3
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • Not supported

Firefox

  • Not supported

Safari

  • Not supported

Edge

  • Not supported

Opera

  • Not supported

Safari on iOS

  • From 3

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
Open Graph and search-engine interpretation

Desktop

Chrome
Unknown
Firefox
Unknown
Safari
Unknown
Edge
Unknown
Opera
Unknown

Mobile

Safari on iOS
Unknown
Chrome for Android
Unknown
Firefox for Android
Unknown
Samsung Internet
Unknown

No single verified compatibility record for this topic. Use the feature-specific articles; no browser support is inferred.

MDN BCD 8.1.5 · Dataset built 2026-10-08 · Mapping reviewed 2026-10-21. These dates are not individual browser-test or claim-verification dates. Unknown means the data does not establish support.

HTML Living Standard

Specifications & further reading