Skip to main content

Appendix A. Notes on Using the Link Header with the HTML4 Format

HTML motivated the original syntax of the Link header, and many of the design decisions in this document are driven by a desire to stay compatible with these uses.

In HTML4, the link element can be mapped to links as specified here by using the "href" attribute for the target URI, and "rel" to convey the relation type, as in the Link header. The context of the link is the URI associated with the entire HTML document.

All of the link relation types defined by HTML4 have been included in the Link Relation Type registry, so they can be used without modification. However, there are several potential ways to serialise extension relation types into HTML4, including

o As absolute URIs,

o using the document-wide "profile" attribute's URI as a prefix for relation types, or

o using the RDFa [W3C.REC-rdfa-syntax-20081014] convention of mapping token prefixes to URIs (in a manner similar to XML name spaces) (note that RDFa is only defined to work in XHTML [W3C.REC-xhtml-basic-20080729], but is sometimes used in HTML4).

Individual applications of linking will therefore need to define how their extension links should be serialised into HTML4.

Surveys of existing HTML content have shown that unregistered link relation types that are not URIs are (perhaps inevitably) common. Consuming HTML implementations should not consider such unregistered short links to be errors, but rather relation types with a local scope (i.e., their meaning is specific and perhaps private to that document).

HTML4 also defines several attributes on links that are not explicitly defined by the Link header. These attributes can be serialised as link-extensions to maintain fidelity.

Finally, the HTML4 specification gives a special meaning when the "alternate" and "stylesheet" relation types coincide in the same link. Such links should be serialised in the Link header using a single list of relation-types (e.g., rel="alternate stylesheet") to preserve this relationship.