This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

meta

Summary

The <meta> element embeds various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements.

Overview Table

DOM Interface
HTMLMetaElement

Attributes

  • name = string
    Sets document metadata.
    • application-name
      Giving the name of the Web application that the page represents.
    • author
      Giving the name of one of the page’s authors.
    • description
      Describes the page. [Example A]
    • generator
      Identifies one of the software packages used to generate the document.
    • keywords
      Giving the keyword relevant to the page. [Example A]

Other metadata names may be registered in the WHATWG Wiki MetaExtensions page.

  • http-equiv = string
    When the http-equiv attribute is specified on a meta element, the element is a pragma directive.

    • content-language
      Sets the pragma-set default language.
    • content-type
      Alternative form of setting the charset attribute
    • default-style
      Sets the name of the default alternative style sheet set.
    • refresh
      Acts as timed redirect. [Example B]
  • content = string
    Gives the value of the document metadata or pragma directive when the element is used for those purposes.

  • charset = character encoding name
    Specifies the character encoding used by the document. [Example A]

Internationalization

Examples

A minimal HTML document with meta information.

<html>
<head>
  <title>World Wide Web Consortium (W3C)</title>
  <meta charset=utf-8" />
  <meta name="description"
        content="The World Wide Web Consortium (W3C) is an international community
        where Member organizations, a full-time staff,
        and the public work together to develop Web standards." />
  <meta name="keyword" content="W3C, HTML, CSS, SVG, Web standards" />
</head>
<body></body>
</html>

Notes

Remarks

The META element also embeds document information that some search engines use to index and categorize documents on the World Wide Web. This element can be used only within the HEAD element. Windows Internet Explorer 8 or later. The behavior of the setAttribute method depends on the current document compatibility mode. For more information, see Attribute Differences in Internet Explorer 8

Related specifications

HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
HTML 4.01
W3C Recommendation

See also

Related pages

  • Reference
  • content
  • httpEquivhttpEquiv
  • Conceptual
  • Defining Document Compatibility

Attributions