13. XHTML Metainformation Module


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, name (NMTOKEN) ( ( PCDATA | Inline )* | meta+ )

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: RELAX NG

13.1. The meta element

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


The Common collection
A collection of other attribute collections, including: Core, Events, I18N, Bi-directional, Edit, Embedding, Map, and Hypertext
name = NMTOKEN
This attribute identifies the property name. This recommendation does not specify legal values for this attribute.

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"

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" xml: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 RDF

meta and RDF

How to represent and include RDF in XHTML2 documents is under discussion.

13.1.3. meta data profiles

Improve handling of meta data profiles

There are number of suggestions to improve handling of meta data profiles. The Working Group has not resolved this issue yet.

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">
      <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>