HTML Reference Guide


Tag Index| Content List| HTML FAQ

<LINK> ... LINK

Description:

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.

Attributes:

charset - This attribute indicates the character encoding of the destination resource of the hyperlink.

disabled - This is a stand-alone attribute which indicates the linked dependency is initially non-functional.

href - This attribute indicates the URL of a document linked to the current document through relationships established by the other attributes of this tag.

hreflang - This attribute specifies the base language of the resource indicated in the HREF attribute.

media - This attribute is a keyword representing the intended rendering destination for the style sheet definitions. Multiple destinations are given delimited by commas.

rel - The REL attribute is meant to give the relationship(s) described between the current document and the document specified by the HREF attribute.

rev - The REL 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.

target - This attribute specifies the named frame for the browser to display the form results after the user submits information to a processing script.

title -This attribute suggests a title (advisory only) for the destination resource indicated by the LINK HREF attribute. The TITLE attribute may be used for display prior to accessing the destination resource (such as in a margin note or in a pop-up box while the mouse is over the hyperlink), or for resources that do not include titles (like graphics, plain text documents or Gopher menus.)

type - This attribute represents the MIME type of the linked resource.

Example code:

<html><head><title>Document Title</title><link TITLE="Here is my home page" REL="HOME" HREF="../../cc/html/myhome.html"><link REL="STYLESHEET" HREF="http://www.company.com/mystyles.css" TYPE="text/css"></head><body> Document content goes here.</body></html>

 

Result:

See Also: