# link

Defines the relationship between the current document and another document.

## Platform Support

IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | ---
3.0+ | 4.0+ | 1.0+ | no | 1.0+

## Example

This example shows a <head>&</head>& element with a link to a stylesheet:

    <head>
    	<title>Aptana Home Page</title>
    	<link rel="stylesheet" href="style.css" type="text/css" />
    &/head>

## Remarks

Remember to self-close your <link /> tags.Specify link tags (e.g. to stylesheets) as children of the `head` element.

## Attribute Detail

Attribute | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
charset Specifies the character set associated with the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
class [class-name]. Example values: header-class, list-element, etc. CSS class assigned to the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
dir Direction of the element text. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
disabled Specifies whether or not the element is disabled. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
href [url] Path or URL for the linked document or object. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
hreflang [language-code]. Example values: "en" (English), "fr" (French), "es" (Spanish), etc. Language of the linked document. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
id [element-id] Unique identifier for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
lang [language-code]. Example values: "en" (English), "fr" (French), "es" (Spanish), etc. Language code for the content of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
media Media type associated with the element. | 4.0+ | 1.1+ | 1.0+ | 4.0+ | 1.0+
rel Defines the relationship of the linked document to the current document. | 3.0+ | 4.0+ | 1.0+ | no | 1.0+
rev Defines the relationship of the current document to the linked document. | 3.0+ | 4.0+ | 1.0+ | no | 1.0+
style [style-name] Inline style for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
target Example values: "myCat.html" (url), "_blank", "_self", etc. Target window to use for opening the linked document. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
title [text-description] Short text description for the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
type (link) Specifies the type of linked file. | 4.0+ |  | 1.0+ | 7.0+ | 1.0+

## Event Detail

Event | IE | Netscape | Mozilla | Opera | Safari
--- | --- | --- | --- | --- | ---
onclick Fires when the element is clicked. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
ondblclick Fires when the element is double-clicked. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onkeydown Fires when a user presses down on a key while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onkeypress Fires when a user presses a key or holds down the key while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onkeyup Fires when a user releases a key while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onload Fires when the content of the element finishes loading. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onmousedown Fires when a user clicks down on the mouse button while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onmousemove Fires when the mouse moves while the pointer over the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onmouseout Fires when the mouse pointer moves off of the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onmouseover Fires when the mouse pointer moves over the element. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onmouseup Fires when the user releases the mouse button while the element has focus. | 2.0+ | 1.0+ | 1.0+ | 4.0+ | 1.0+
onreadystatechange Fires when the ready state of the element changes. | 4.0+ | no | no | no | no

## Availability

W3C HTML 4.01

text_html aptana_docs