The LINK element defines a relationship between the current document and another resource. Relationship values can be used to link a document to:
- a separate style sheet (rel=stylesheet);
- a separate script (rel=script);
- a printable version of a document, e.g. a postscript or pdf version (rel=alternate media=print);
Although the LINK element has no content, the relationship it defines may be used by some user agents to refer to collections of HTML nodes, as in:
- document specific toolbars or menus (rel = start, contents, previous, next, index, end, help);
- and to control how these collections may be rendered into printed documents.
The LINK element conveys the relation between the current document and the linked object in its attributes, as follows:
- rel="linktype"
- specifies the link-type of the relation, which may refer to an object as described above;
- type="content-type"
- specifies the content-type of the linked object;
- href="path/filename.css"
- specifies the URI or location of the linked object.
The LINK element requires only a start tag; the end tag is forbidden.
The LINK element must be declared within the document HEAD.
For the complete list of attributes applicable to link relations, see the LINK element in the HTML Reference.
Some relevant external references:
Previous: HTML Elements Next: Using Tables