Next / Previous / Contents / TCC Help System / NM Tech homepage

8.5. The meta element: Page meta-information

You can use any number of meta elements inside your head element to describe several kinds of information about the document.

Each meta element names some property of the page and specifies a value for that property. In some cases, the name attribute names the property and the content attribute gives the value for the property. Some properties are defined by the HTTP protocol; in that case, the http-equiv attribute names the property and the content attribute gives its value.

Here is the content model:

element meta
{ attribute xml:lang { text }?,
  attribute http-equiv { xsd:NMTOKEN },
  attribute name { xsd: NMTOKEN },
  attribute content { text }?,
  attribute scheme { text }?,
  empty
}
xml:lang

Use this attribute to specify the language used in the value of the content attribute; see Section 15.1, “The xml:lang attribute”.

http-equiv

When specifying properties defined by HTTP, this attribute states the name of the property.

name

The name of the property being defined.

content

The value of the property being defined.

scheme

This attribute, when used, describes how the content property is interpreted.

The property names and values allowed here are many. Here are just a few examples. The first example gives the author's name, and tags the name as French.

<meta name="author" content="Pierre de Beaumarchais" xml:lang="fr">

The next example defines a few keywords to help search engines determine what's on the page:

<meta name='keywords' content='grackles, icterids, spackle'>

Here is an example of the use of the http-equiv attribute to define the document type as HTML and the character set as US ASCII:

<meta http-equiv='Content-Type' content='text/html; charset=US-ASCII'>

For a detailed discussion of the meta element, refer to the relevant section of the HTML 4.01 specification.

Note

The Resource Description Framework (RDF) specification describes a much more detailed and generalized way to specify document metadata. RDF metadata is more suitable for automated processing.