From W3C Wiki
Jump to: navigation, search




  • name属性、http-equiv属性、charset属性のうち一つは指定しなければなりません。
  • もしname属性かhttp-equiv属性が指定された場合、content属性も指定しなければなりません。そうでなければ、それは省略されなければなりません。


  • 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. [例題 A]
    • generator
      Identifies one of the software packages used to generate the document.
    • keywords
      Giving the keyword relevant to the page. [例題 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. [例題 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. [例題 A]



例題 A

  <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">

例題 B


<meta http-equiv="Refresh" content="300">


<meta>要素は、HTML5仕様書の4.2.5 The meta elementに定義されています。