23. XHTML Metainformation Module


This section is normative.

The Metainformation Module defines elements that allow the definition of relationships. These may relate to:

Note that this module is dependent upon the Metainformation Attributes module. The interpretation of those attributes in conjunction with any elements, including the ones defined in this module, are spelled out in [RDFASYNTAX].

Elements and attributes in this module are:

ElementsAttributesContent Model
link CommonEMPTY
meta Common meta?

Implementations: RELAX NG, XML Schema

23.1. The link element


The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, Metainformation, and Role

This element defines a link. Link conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links). User agents should enable activation of links and the retrieval of link targets. Since link elements may have no content, information from the @rel and @title attributes should be used when labelling links.

This example illustrates how several link definitions may appear in the head section of a document. The current document is "Chapter2.html". The @rel attribute specifies the relationship of the linked document with the current document. The values "Index", "Next", and "Prev" are explained in the section on the attribute @rel.

  <title>Chapter 2</title>
  <link rel="index" href="../index.html"/>
  <link rel="next"  href="Chapter3.html"/>
  <link rel="prev"  href="Chapter1.html"/>

23.1.1. Forward and reverse links

While the @rel attribute specifies a relationship from this document to another resource, the @rev attribute specifies the reverse relationship.

Consider two documents A and B.

Document A:       <link href="docB" rel="index"/>

Has exactly the same meaning as:

Document B:       <link href="docA" rev="index"/>

namely that document B is the index for document A.

Both the @rel and @rev attributes may be specified simultaneously.

23.1.2. Links and search engines

Authors may use the link element to provide a variety of information to search engines, including:

The examples below illustrate how language information, media types, and link types may be combined to improve document handling by search engines.

The following example shows how to use the @hreflang attribute to indicate to a search engine where to find other language versions of a document. Note that for the sake of the example the @xml:lang attribute has been used to indicate that the value of the @title attribute for the link element designating the French manual is in French.

<html ... xml:lang="en">
<title>The manual in English</title>
<link title="The manual in Dutch"
<link title="La documentation en Français"
      hreflang="fr" xml:lang="fr"

In the following example, we tell search engines where to find the printed version of a manual.

<title>Reference manual</title>
<link media="print" 
      title="The manual in PostScript"

In the following example, we tell search engines where to find the front page of a collection of documents.

<title>Reference manual -- Chapter 5</title>
<link rel="start" title="The first chapter of the manual"

23.2. The meta element


The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, Metainformation, and Role

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 defines a small normative set of properties, but users may extend this set as described for the @property attribute.

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

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


<meta property="dc:creator">Steven Pemberton</meta>

Note. The meta element is a generic mechanism for specifying metadata. However, some XHTML elements and attributes already handle certain pieces of metadata 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 metadata via the link element. Thus, the following metadata declaration:


<meta property="dc:identifier">

might also be written:


<link rel="dc:identifier"
      href="http://www.rfc-editor.org/rfc/rfc3236.txt" />

23.2.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 property="keywords" 
      xml:lang="en-us">vacation, Greece, sunshine</meta>
<!-- For speakers of British English -->
<meta property="keywords" 
      xml:lang="en">holiday, Greece, sunshine</meta>
<!-- For speakers of French -->
<meta property="keywords" 
      xml:lang="fr">vacances, Grè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.