13. 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 Common, http-equiv (NMTOKEN), name (NMTOKEN) PCDATA

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

13.1. The meta element

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

Attributes

The Common collection
A collection of other attribute collections, including: Core, Events, I18N, Bi-directional, Edit, Embedding, and Hypertext
name = CDATA
This attribute identifies the property name. This recommendation does not specify 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.

meta properties

We should specify a minimal set of useful meta properties

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

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

<meta name="Author">Steven Pemberton</meta>

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 edit and related attributes, 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">http://www.rfc-editor.org/rfc/rfc3236.txt</meta>

might also be written:

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

13.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" xml:lang="en-us">vacation, Greece, sunshine</meta>
<-- For speakers of British English -->
<meta name="keywords" xml:lang="en">holiday, Greece, sunshine</meta>
<-- For speakers of French -->
<meta name="keywords" lang="fr">vacances, Gr&egrave;ce, soleil</meta>

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.

13.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">
   (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))
   </meta>
   <title>... document title ...</title>
   </head>

13.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.

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