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

8.4. The link element: Related documents

This element defines a relationship between this page and some other page (referred to as the “linked resource”). For example, you might want to point to the table of contents for the document containing this page. Here is the content model:

element link
{ attribute charset { text }?,
  attribute href { xsd:anyURI }?,
  attribute hreflang { text }?,
  attribute type { text }?,
  attribute rel { xsd:NMTOKENS }?,
  attribute rev { xsd:NMTOKENS }?,
  attribute media { text }?,
  Common.attrib,
  empty
}
charset

The character set of the linked resource, if different from the referring document. See Section 15.2, “The charset attribute: Declaring a character set”.

href

The URI of the linked resource.

hreflang

The language code of the linked resource. For definitions of the language codes, see Section 15.1, “The xml:lang attribute”.

type

The MIME type of the linked resource. This describes the resources format, e.g., HTML or CSS. See Section 6.7, “MIME types: Defining a resource's format”.

rel

Describes the type of relationship between this file and the linked resource. For possible values, see Section 6.5, “The link datatype”. For example, if document beverly.html is the one following this one, you might use the element “<link rel='next' href='beverly.html'/>”.

rev

Describes a reverse relationship, the opposite of the rel attribute. For example, if the current document precedes beverly.html in the logical sequence, you might use the element “<link rev='prev' href='beverly.html'/>”.

media

Describes the media for which the linked resource is set up. For possible values, see Section 6.6, “Media type” .

Common.attrib

A link element can include any of the attributes discussed in Section 15.3, “The common attributes: Common.attrib.

Here is an example of a link element that specifies that the document uses deadwood.css as its CSS stylesheet:

<link rel='stylesheet' href='deadwood.css' type='text/css'/>