<LINK> | NN 4 IE 3 HTML all
<LINK> | HTML End Tag: Forbidden
Unlike the a element (informally called a link when it contains an href attribute), the link element belongs inside the head element and is a place for the document to establish links with external documents, such as style sheet definition files or font definition files. By and large, browsers have yet to exploit the intended powers of this element. A variety of attributes let the author establish relationships between the current document and potentially related documents. In theory, some of these relationships could be rendered as part of the document or browser controls. Implementations of this element as of Version 6 of Navigator and Internet Explorer are rather weak compared to the HTML 4 specification. At the same time, several attributes (and all event handlers) defined in the HTML 4 specification and listed among shared items at the beginning of this chapter aren't very helpful because they more typically apply to elements that actually display content on the page. No explicit document content is rendered as a result of the link element. Some of those attributes may be associated with the link element by mistake or merely for consistency.
Example
    <HEAD>
    <TITLE>Section 3</TITLE>
    <LINK rev="Prev" href="sect2.html">
    <LINK rel="Next" href="sect4.html">
    <LINK rel="stylesheet" type="text/css" href="myStyles.css">
    </HEAD>
Object Model Reference
    [window.]document.getElementById(elementID)
Element-Specific Attributes
charset | href | hreflang | media | rel
rev | src | target | type |
Element-Specific Event Handler Attributes
None.

charset | NN 6 IE n/a HTML 4
charset="characterSet" | Optional
Character encoding of the content at the other end of the link.
Example
    <LINK charset="csISO5427Cyrillic" href="moscow.html">
Value
Case-insensitive alias from the character set registry (ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets).
Default
Determined by browser.

disabled | NN 6 IE 4/5.5 HTML 4
disabled="featureSwitch" | Optional
Boolean switch that enables or disables the user's ability to activate or otherwise access an element. This attribute is limited to interactive form control elements in Netscape 6 and HTML 4. IE 5.5 and later (Win32 only) also applies this attribute to most other renderable elements. Disabled elements are usually "greyed out" to distinguish themselves from other elements.
Example
    <INPUT type="submit" name="sender" disabled="true">
Value
true | false
Default
false
Object Model Reference
    [window.]document.getElementById(elementID).disabled

href | NN 6 IE 3 HTML all
href="URI" | Required
The URI of the document associated with the link (also known in W3C jargon as the destination, even though there is no page navigation involved). Navigator 4 uses the src attribute for this purpose. Include both attributes for a backward-compatible implementation.
Example
    <LINK rel="Prev" href="sect2.html" src="sect2.html">
Value
Any valid URI, including complete and relative URLs.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).href

hreflang | NN 6 IE 6 HTML 4
hreflang="languageCode" | Optional
The language code of the content at the destination of a link. Requires that the href attribute also be set. This attribute is primarily an advisory attribute to help a browser prepare itself for a new language set if the browser is so enabled.
Example
    <LINK hreflang="HI" href="hindi/Chap3.html">
Value
Case-insensitive language code.
Default
Browser default.
Object Model Reference
    [window.]document.getElementById(elementID).hrefLang

lang | NN 3 IE 4 HTML 4
lang="languageCode" | Optional
The language being used for the element's attribute values and content. A browser can use this information to assist in proper rendering of content with respect to details such as treatment of ligatures (when supported by a particular font or required by a written language), quotation marks, and hyphenation. Other applications and search engines might use this information to aid the selection of spell-checking dictionaries and the creation of indices.
Example
    <SPAN lang="de">Deutsche Bundesbahn</SPAN>
Value
Case-insensitive language code.
Default
Browser default.
Object Model Reference
    [window.]document.getElementById(elementID).lang

media | NN 6 IE 4 HTML 4
media="descriptorList" | Optional
Sets the intended output device for the content of the destination document pointed to by the href attribute. The media attribute looks forward to the day when browsers are able to tailor content to specific kinds of devices such as pocket computers, text-to-speech digitizers, or fuzzy television sets. The HTML 4 specification defines a number of constant values for anticipated devices, but the list is open-ended, allowing future browsers to tailor output to yet other kinds of media and devices.
Example
    <LINK rel="Glossary" href="gloss.html" media="screen, tv, handheld">
Value
Constant values. Multiple values can be grouped together in a comma-delimited list within a quoted string. Values defined in HTML 4 are all | aura | braille | handheld | print | projection | screen | tty | tv . IE 4 and later claims support for all | print | screen.
Default
screen
Object Model Reference
    [window.]document.getElementById(elementID).media

rel | NN 4 IE 3 HTML 3.2
rel="linkTypes" | Optional
Defines the relationship between the current element and the destination of the link. The HTML 4 recommendation defines several link types; it is up to the browser to determine how to employ the value. The element must include an href attribute for the rel attribute to be applied.
Example
    <LINK rel="Next" href="sect6.html">
Value
Case-insensitive, space-delimited list of standard link types applicable to the document and browser. HTML 4-sanctioned link types are:
alternate | appendix | bookmark | chapter
contents | copyright | glossary | help
index | next | prev | section
start | stylesheet | subsection |
IE 4 and later and Navigator 4 and later use stylesheet to link in an external CSS file. Navigator 4 recognizes stylesheet and fontdef. In IE 5 and later for Windows, you can also use the value shortcut icon (with the space) and assign a URL to a custom icon file (.ico) on your server so that your icon appears in the Favorites list if the user chooses to add the page to his list.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).rel

rev | NN 6 IE 4 HTML 4
rev="linkTypes" | Optional
A reverse link relationship. Like the rel attribute, the rev attribute's capabilities are defined by the browser, particularly with regard to how the browser interprets and renders the various link types available in the HTML 4 specification. Given two documents (A and b) containing links that point to each other, the rev value of b is designed to express the same relationship between the two documents as denoted by the rel attribute in A. Version 6 browsers provide no practical functionality for this attribute.
Example
    <LINK rev="Prev" href="sect4.html">
Value
Case-insensitive, space-delimited list of HTML 4 standard link types applicable to the element. See the rel attribute for sanctioned link types.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).rev

src | NN 4 IE n/a HTML n/a
src="URL" | Optional
The URL of the destination of a link. Internet Explorer 4 and later, Netscape 6, and HTML 4 use the href attribute for this purpose. Include both attributes for a cross-browser implementation.
Example
    <LINK rel="fontdef" src="fonts/garamond.pfr" href="fonts/garamond.pfr">
Value
Any valid URL, including complete and relative URLs.
Default
None.

target | NN 6 IE 4 HTML 4
target="windowOrFrameName" | Optional
Presumably, the target attribute is provided in HTML 4 as a way to specify the destination for the display of a document at the other end of the href attribute of the link element.
Value
Identifier when the frame or window name has been assigned via the target element's name attribute. Four reserved target names act as constants: IE for Windows implements two other values: _search (IE 5 and later) and _media (IE 6). These supposedly direct the browser to load linked content into the browser's Search pane and Media Bars, respectively. Precise implementation details are not yet clear.
Default
_self
Object Model Reference
    [window.]document.getElementById(elementID).target

type | NN 4 IE 4 HTML 4
type="MIMEType" | Optional
An advisory about the content type of the destination document or resource. In practice, this attribute has been used so far to prepare the browser for the style sheet type being linked to.
Example
    <LINK rel="stylesheet" type="text/css" href="styles/mainStyle.html">
Value
Case-insensitive MIME type. A catalog of registered MIME types is available from ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).type