TAG:  link

<link>
Available in versions: 2.0, 3.2, 4.0
Browser compatibility: Explorer 4, 5  Netscape 4, 6
 
The <link> tag is used to establish a relationship between the current document and one or more other related documents. For example, if you have a Cascading Style Sheets .css file that defines the style for an entire web site, then each file in the site would be linked to the .css file using the link tag.
 
This tag can be used more than once (i.e., one link per tag). Each occurrence of this tag must be placed inside the head element. A value for the href attribute is required.
 
There is no closing tag.
 
Core Attributes
 
class    dir    id    lang    onclick    ondblclick    onkeydown    onkeypress    onkeyup    onmousedown    onmousemove    onmouseout    onmouseover    onmouseup    style    title
 
Attributes
 
charset
The charset attribute is used to specify the character encoding used on the page that is the target of the link. Character encoding defines how a sequence of bytes is to be converted into characters for display.
 
href
The href attribute is a valid URL address for another document. This attribute is required.
 
hreflang
The hreflang attribute can only be used when the href attribute is also being used. It specifies the language of the page that is the target of the link.
 
media
The media attribute specifies which medium the link apply to. Permitted values include: all, aural, braille, handheld, print, projection, screen, tty, and tv.
 
rel
The rel attribute is currently not fully supported by most browsers. It is a space-separated list of one or more values that specify the relationship from the source page to the target for a link. Some of the proposed values are, appendix, bookmark, chapter, contents, copyright, glossary, help, index, next, prev, section, stylesheets, and subsection.
 
rev
The rev attribute is currently not fully supported by most browsers. It is a space-separated list of one or more values that specify the relationship from the target page to the source for a link. Perhaps the most useful value is relation.
 
target
The target attribute specifies the name of the frame or window in which the target page should appear when a link is clicked. The four reserved names are _blank, _parent, _self, and _top.
 
type
The type attribute specifies the MIME (Multipurpose Internet Mail Extension) type of the linked document. Two permitted type values include: text/css and text/javascript.
 
This example demonstrates the code for creating two different types of links.
 
Code:
<head>
<link rel="stylesheet" type="text/css" href="include/StylesDefinitions.css">
<link rev="relation" href="http://www.fly-by-day-computing.com">
<title> Fly-By-Night-Computing </title>
</head>


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information