The <meta> Tag
Usage and Syntax
The <meta>
tag is used to convey meta-information
that cannot be conveyed using other tags. It has the following attributes:
name
- Specifies the name for the meta-information.
http-equiv
- Specifies a header to be included in the document's HTTP headers.
content
- Specifies the value for the keyword specified with the
name
or http-equiv
attribute.
scheme
- Provides additional information for the interpretation of the
meta-information. This attribute was first introduced in the HTML 4.0
specification and is not yet well supported by browsers.
Misuse of the <meta>
Tag
There are two typical ways in which the <meta>
tag is misused:
- Using the
<meta>
tag to convey information that can
(and thus should) be conveyed by other tags, such as
<title>
, <link>
,
and <base>
.
- Using the
http-equiv
attribute where the name
attribute should instead be used. The http-equiv
attribute
should only be used for keywords that are HTTP headers.
Common Values for the name
Attribute
- author
- The author of the page.
- contributor
- Specifies the name of a contributor to the page.
- copyright
- The page's copyright information.
- creator
- The creator (i.e. author) of the page.
- date
- The page's date of creation or last update.
Stick to ISO format dates (YYYY-MM-DD) here.
- description
- The description of the page.
Used to give a brief description of the page for search engines.
- generator
- The program that generated this page.
Typically added automatically by generators.
- identifier
- A unique identifier to identify a page in a site.
- keywords
- Specifies keywords for the page.
Used to tell search engines what a page is about.
- language
- The two-character code representing the language the page
is written. For example, for a page written in German:
<meta name=language content=de>
- publisher
- The publisher of the page
(e.g. one's workplace, school, etc.).
- rights
- The copyright for the page.
- robots
- Specifies whether search engines should index this page and/or
follow links in the page. For example,
<meta name=robots content="noindex,nofollow">
specifies that robots should neither index this page nor follow links.
- source
- The ISBN number of the book this page is from.
- subject
- The subject of the page.