Link

End Tag: Omitted
Support Key: 2 | 3 | 3.2 | 4 | IE3B1 | M3 | N4B2 | O3.5
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson [bloo@blooberry.com] =
Main Index | Element Tree | Element Index | HTML Support History


What is it?
The Link element is a special HEAD element utilizing many of the same attributes as the Hyperlink element [A]. It indicates a relationship between the current document and some other object. A document may have any number of LINK elements which can indicate authorship, related indices and glossaries, older or more recent versions, document hierarchy, associated resources such as style sheets, etc. Servers may also allow links to be added to a document by those who do not have the right to alter the body portion of a document. The popular browsers are just beginning to support this element, which has been in the HTML specifications for some time.
Some uses for LINK
Many of the following keywords are taken from the expired HTML 3.0 Draft. They describe a proposed standard set of relationships for use in documents. Details of browser support and examples are further down.

REL=Bookmark
These are used to provide direct links to key entry points into an extended document. The TITLE attribute may be used to label the bookmark. Several bookmarks may be defined in each document, and provide a means for orienting users in extended documents.
REL=Copyright
References a copyright statement for the current document.
REL=Fontdef
References a downloadable font definition file.
REL=Glossary
References a document providing a glossary of terms that pertain to the current document.
REL=Help
References a document offering help, e.g. describing the wider context and offering further links to relevant documents. This is aimed at reorienting users who have lost their way.
REL=Home
References a home page or the top of some hierarchy.
REL=Index
References a document providing an index for the current document.
REL=Next
References the next document to visit in a document structure or guided tour.
REL=Previous
References the previous document in a document structure or guided tour.
REL=StyleSheet
References an external Style Sheet [-->Index DOT Css] which is used to control the way the current document is rendered.
REL=ToC
References a document serving as a table of contents.
REL=Up
If the document is part of a hierarchy, this references the immediate parent of the current document.

Defining document specific toolbars
[ IE | M3 | N | O ]
The LINK element can be used to define a toolbar of navigation buttons or an equivalent mechanism such as menu items. Many of the values for the REL attribute could be reserved for this purpose (such as Home, Next, Previous, etc.)
Example:
<link TITLE="Here is my home page" REL="HOME" HREF="myhome.htm">

Link to an associated Style Sheet
[ IE3B1 | M | N4B2 | O3.5 ]
The LINK element can be used with REL=StyleSheet to reference an external Style Sheet which is used to control the way the current document is rendered.
Example:
<link REL="STYLESHEET" HREF="http://www.company.com/mystyles.css" TYPE="text/css">

Link to a Font Definition file
[ IE | M | N4 | O3.5 ]
The LINK element can be used with REL=Fontdef to reference a downloadable font definition file.
Example:
<link REL="FONTDEF" SRC="http://www.example.com/fonts/downloadfont.pfr">

Common Attributes
%Core%
2 | 3 | 3.2 | 4 | IE4 | M3 | N | O
%Events%
2 | 3 | 3.2 | 4 | IE | M | N | O
%Language%
2 | 3 | 3.2 | 4 | IE | M | N | O

Specific Attributes
Charset
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute indicates the character encoding of the destination resource of the hyperlink.
Values:
A recognized RFC 2045 language character set string. Default is ISO-8859-1.
Disabled
2 | 3 | 3.2 | 4 | IE4 | M | N | O
Required? No
Description:
This is a stand-alone attribute which indicates the linked dependency is initially non-functional.
Values: NA
Href
2 | 3 | 3.2 | 4 | IE3B1 | M3 | N4B2 | O3.5
Required? No
Description:
This attribute indicates the URL of a document linked to the current document through relationships established by the other attributes of this tag.
Values: Relative or absolute URLs.
Hreflang
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute specifies the base language of the resource indicated in the HREF attribute.
Values: RFC 1766 values.
Media
2 | 3 | 3.2 | 4 | IE4 | M | N | O3.5
Required? No
Description:
This attribute is a keyword representing the intended rendering destination for the style sheet definitions. Multiple destinations are given delimited by commas.
Values:
screen [DEFAULT] - style information should be used for rendering to computer screens.
print - style information should be used for rendering to page-centric devices, ie: printed paper or print preview screen modes.
projection - style information should be used for rendering to transparent projected media devices.
braille - style information should be used for rendering to braille devices.
speech - style information should be used for rendering to speech synthesizers.
all - style information should be used for rendering to all devices.
Rel
2 | 3 | 3.2 | 4 | IE3B1 | M3 | N4B2 | O3.5
Required? No
Description:
The REL attribute is meant to give the relationship(s) described between the current document and the document specified by the HREF attribute.
Values: A whitespace separated list of relationship names.
Rev
2 | 3 | 3.2 | 4 | IE4 | M3 | N | O
Required? No
Description:
The REV attribute is basically meant to be the same as the REL attribute, but the semantics of the relationship are in the reverse direction. A link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". A LINK tag may have both REL and REV attributes.
Values: A whitespace separated list of relationship names.
Src
2 | 3 | 3.2 | 4 | IE | M | N4 | O
Required? No
Description:
This attribute indicates the URL of a downloadable font definition file.
Values: Relative or absolute URLs.
Target
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute specifies the named frame for the browser to display the linked resource if activated by the system or user.
Values: The TARGET reserved names apply.
Type
2 | 3 | 3.2 | 4 | IE3B1 | M | N4B2 | O
Required? No
Description:
This attribute represents the MIME type of the linked resource.
Values: (wrt style sheet usage) text/css, text/javascript
Example
<html>
<head>
     <title>Document Title</title>
     <link TITLE="Here is my home page" REL="HOME" HREF="myhome.htm">
     <link REL="STYLESHEET" HREF="http://www.company.com/mystyles.css" TYPE="text/css">
</head>
<body>
     Document content goes here.
</body>
</html>
Parent Model
<head>
Content Model
This element does not accept any content.
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...