15. XHTML Metainformation Module

Contents

This section is normative.

The Metainformation Module defines an element that describes information within the declarative portion of a document (in XHTML within the head element). This module includes the following element:

Elements Attributes Minimal Content Model
meta I18N, content* (CDATA), http-equiv (NMTOKEN), name (NMTOKEN) EMPTY

When this module is selected, the meta element is added to the content model of the head element as defined in the Structure Module.

Implementation: DTD

15.1. The meta element

For the following attributes, the permitted values and their interpretation are profile dependent:

Attributes

The I18N collection
A collection of attributes related to Internationalization, including the xml:lang.
name = CDATA
This attribute identifies the property name. This recommendation does not specify legal values for this attribute.
content = CDATA
This attribute specifies a property's value. This recommendation does not list legal values for this attribute.
http-equiv = CDATA
This attribute may be used in place of the name attribute. HTTP servers use this attribute to gather information for HTTP response message headers.

The meta element can be used to identify properties of a document (e.g., author, expiration date, a list of key words, etc.) and assign values to those properties. This specification does not define a normative set of properties.

Each meta element specifies a property/value pair. The name attribute identifies the property and the content attribute specifies the property's value.

For example, the following declaration sets a value for the Author property:

<meta name="Author" content="Dave Raggett"/>

The xml:lang attribute can be used with meta to specify the language for the value of the content attribute. This enables speech synthesizers to apply language dependent pronunciation rules.

In this example, the author's name is declared to be French:

<meta name="Author" lang="fr" content="Arnaud Le Hors"/>

Note. The meta element is a generic mechanism for specifying meta data. However, some XHTML elements and attributes already handle certain pieces of meta data and may be used by authors instead of meta to specify those pieces: the title element, the address element, the ins and del elements, the title attribute, and the cite attribute.

Note. When a property specified by a meta element takes a value that is a URI, some authors prefer to specify the meta data via the link element. Thus, the following meta data declaration:

<meta name="DC.identifier"
      content="http://www.ietf.org/rfc/rfc1866.txt"/>

might also be written:

<link rel="DC.identifier"
         type="text/plain"
         href="http://www.ietf.org/rfc/rfc1866.txt"/>

15.1.1. meta and search engines

A common use for meta is to specify keywords that a search engine may use to improve the quality of search results. When several meta elements provide language-dependent information about a document, search engines may filter on the xml:lang attribute to display search results using the language preferences of the user. For example,

<-- For speakers of US English -->
<meta name="keywords" lang="en-us" 
         content="vacation, Greece, sunshine"/>
<-- For speakers of British English -->
<meta name="keywords" lang="en" 
         content="holiday, Greece, sunshine"/>
<-- For speakers of French -->
<meta name="keywords" lang="fr" 
         content="vacances, Gr&egrave;ce, soleil"/>

The effectiveness of search engines can also be increased by using the link element to specify links to translations of the document in other languages, links to versions of the document in other media (e.g., PDF), and, when the document is part of a collection, links to an appropriate starting point for browsing the collection.

15.1.2. meta and PICS

The Platform for Internet Content Selection (PICS, specified in [PICS]) is an infrastructure for associating labels (meta data) with Internet content. Originally designed to help parents and teachers control what children can access on the Internet, it also facilitates other uses for labels, including code signing, privacy, and intellectual property rights management.

This example illustrates how one can use a meta declaration to include a PICS 1.1 label:

<head>
 <meta http-equiv="PICS-Label" content='
 (PICS-1.1 "http://www.gcf.org/v2.5"
    labels on "1994.11.05T08:15-0500"
      until "1995.12.31T23:59-0000"
      for "http://w3.org/PICS/Overview.html"
    ratings (suds 0.5 density 0 color/hue 1))
 '/>
  <title>... document title ...</title>
</head>

15.1.3. meta data profiles

The profile attribute of the html element specifies the location of a meta data profile. The value of the profile attribute is a URI. User agents may use this URI in two ways:

This example refers to a hypothetical profile that defines useful properties for document indexing. The properties defined by this profile -- including "author", "copyright", "keywords", and "date" -- have their values set by subsequent meta declarations.

 <head profile="http://www.acme.com/profiles/core">
  <title>How to complete Memorandum cover sheets</title>
  <meta name="author" content="John Doe"/>
  <meta name="copyright" content="&copy; 1997 Acme Corp."/>
  <meta name="keywords" content="corporate,guidelines,cataloging"/>
  <meta name="date" content="1994-11-06T08:49:37+00:00"/>
 </head>