Skip to navigation

HTML Tag: meta

Metadata — information about the HTML document — that can not be covered by the title, style, link, base, or script elements.

meta elements usually sit most comfortably inside the head element.

Optional Attributes

Attribute Description Possible values
name Name of textual metadata. Used in conjunction with the content attribute. Text. Some commonly used metadata names include:
  • author: The page author’s name.
  • description: A brief description of the page, often used in search engine results. Should only be used once.
  • keywords: Comma-separated keywords that are relevant to the document.
  • viewport: Passes instructions, such as initial-scale and user-scalable to mobile devices.
  • robots: Instructs page crawlers, such as those from search engines, what to do in regard to indexing of the page (index and noindex) and following of its links (follow and nofollow).
http-equiv A “pragma directive”, mimicking a server-side HTTP instruction. Used in conjunction with the content attribute.
  • content-type: Character encoding declaration. An old-skool alternative to the charset attribute.
  • default-style: The preferred stylesheet. Points to a link or style element.
  • refresh: A timed refresh, in seconds, or redirect. Evil.
content The value of the element. Either textual metadata, when given a name by the name attribute, or the value of a corresponding http-equiv attribute. Text.
charset The character encoding of the HTML page. Should only be used once. A character encoding declaration. UTF-8 is advised.
Global attributes


<head lang="en">
    <meta charset="utf-8">
    <title>HTML Tag: meta</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">