Creates a relationship between two documents. Examples of such relationships include: stylesheet, alternate stylesheet, shortcut icon, copyright, bookmark, chapter, glossary, help, home, next, prev, e.t.c.

Note that a Shell component is required when using the Relation element. The Shell component is responsible for gathering all Relation components found in a page, and rendering them inside the <head> tag.

See also: Style , Shell


Name Type Required Default Description
href String or IAsset yes The target URL of the related resource.
rel String no literal:stylesheet Defines the relationship between the current document and the targeted document.
type String no literal:text/css Specifies the MIME type of the target URL.
rev String no Defines the relationship between the targeted document and the current document, i.e. the reverse relationship.
title String no The title of the relation.
media String no Specifies on which device the document will be displayed.

Body: removed

Informal parameters: forbidden

Reserved parameters: none


This example demonstrates how a component (in this case Article) can declare relationships to external documents. In this case, all declarations (a stylesheet, a shortcut icon and a copyright document) are rendered inside the <head> tag of the containing page.


<html jwcid="@Shell" title="Relation Example">
   <body jwcid="@Body">
      <span jwcid="@Article"/>


<link jwcid="@Relation" href="main.css" media="all"/>                
<link jwcid="@Relation" rel="shortcut icon" href="favicon.ico" type="image/gif"/>
<link jwcid="@Relation" rel="copyright" href=""/>  
Article details ...


<component-specification allow-body="yes" allow-informal-parameters="no">