Name
meta — HTML 4.01 | HTML5
Synopsis
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.
Attributes
Internationalization, HTML5 Global Attributes
charset="
character set
"
HTML5 only. Can be used with the
meta
element as a substitute for thehttp-equiv
method for declaring the character set of the document.content="
text
"
Required. Specifies the value of the
meta
element property and is always used in conjunction withname
orhttp-equiv
.http-equiv="
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 thename
attribute).id="
text
"
XHTML and HTML5. Assigns a unique identifying name to the element.
name="
text
"
Specifies a name for the
meta
information property.scheme="
text
"
Not in HTML5. Provides additional information for the interpretation of metadata.
Example (HTML)
<meta name=
"copyright"content=
"2006, O'Reilly ...
Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.