link (HTML5)

Defines the relationship between the current document and another document.

Properties & Events

KeyDescriptionAvailability
charsetSpecifies the character set associated with the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
classCSS class assigned to the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
dirDirection of the element text.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
disabledSpecifies whether or not the element is disabled.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
hrefPath or URL for the linked document or object.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
hreflangLanguage of the linked document.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
idUnique identifier for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
langLanguage code for the content of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
mediaMedia type associated with the element.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 4.0
relDefines the relationship of the linked document to the current document.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera ??
revDefines the relationship of the current document to the linked document.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera ??
styleInline style for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
targetTarget window to use for opening the linked document.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
titleShort text description for the element.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
typeSpecifies the type of linked file.
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 7.0
onclickFires when the element is clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
ondblclickFires when the element is double-clicked.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeydownFires when a user presses down on a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeypressFires when a user presses a key or holds down the key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onkeyupFires when a user releases a key while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onloadFires when the content of the element finishes loading.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousedownFires when a user clicks down on the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmousemoveFires when the mouse moves while the pointer over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoutFires when the mouse pointer moves off of the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseoverFires when the mouse pointer moves over the element.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0
onmouseupFires when the user releases the mouse button while the element has focus.
chrome 1.0safari 1.0Firefox 1.0ie 2.0opera 4.0

Examples having uses of: 'link'

1 votes
11k views

CSS Pseudo on link tag

In this example, a hyperlink with a destination of "#" is set to display different colouring for different properties.
0 votes
1k views

CSS Pseudo

CSS pseudo-classes are used to add special effects to some selectors.
0 votes
1k views

CSS RGB Color

CSS colors can be appied radomly using RGB combination (Red,Green,Blue).
0 votes
1k views

CSS Color

Colors can be applied to any HTML element. Like div, text, body ,paragraph etc.
0 votes
1k views

Complete Web Page Example

The HTML head Element The head element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more. The following tags can be added to the head section: <title>, <base>, <link>, <meta>, <script>, and <style>.
0 votes
1k views

HTML Link

The <link> tag defines the relationship between a document and an external resource. The <link> tag is most used to link to style sheets:
0 votes
1k views

JavaScript Link Object

The link object is used to include the external file in the web page. This tag must be inside the head tag of the page. Here is the example of the link that give the type of the external sheet.