meta

FilterElements

HTML: <meta>
XHTML: <meta/>  or  <meta />

Provides additional information about the document. It should be placed within the head of the document. It is commonly used to identify its media type and character set. It can also provide keywords, author information, descriptions, and other metadata. The head element may contain more than one meta element.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown. Developers may include a space character before the slash for backward compatibility with older browsers.

Specifications

  • HTML 4.01
  • HTML5

charset=

Values: character set
HTML5 only. Can be used with the meta element as a substitute for the http-equiv method for declaring the character set of the document.

content=

Values: text
Required. Specifies the value of the meta element property and is always used in conjunction with name or http-equiv.

http-equiv=

Values: text
The specified information is treated as though it were included in the HTTP header that the server sends ahead of the document. It is used in conjunction with the content attribute (in place of the name attribute).

id=

Values: text
XHTML and HTML5. Assigns a unique identifying name to the element.

name=

Values: text
Specifies a name for the meta information property.

scheme=

Values: text
Not in HTML5. Provides additional information for the interpretation of metadata.
HTML 4.01
<meta name="copyright" content="2006, O'Reilly Media" >
XHTML
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="refresh" content= "15" />
HTML5
<meta charset="UTF-8">

Rendered Example

meta is a non-rendering element.