The Link element indicates a relationship between the document and some other object. A document may have any number of Link elements.
The Link element is empty (does not have a closing element), but takes the same attributes as the Anchor element.
The <LINK>
element would typically be used to provide pointers to related indexes, or glossaries. Links can also be used to indicate a static tree structure in which the document was authored by pointing to a "parent" and "next" and "previous" document. Mosaic (v3.0 for Windows 95/NT4) totally supports the <LINK>
element and presents the user with a toolbar populated with buttons for every <LINK>
element specified.<LINK REL="...">
is one that Mosaic recognises, it will show the toolbar button with a pre-set graphic, together with whatever text is specified in the TITLE attribute, as the text on the button. The remote location, specified in the HREF attribute is the location that Mosaic will browse to when the button is clicked. Below is a list of the possible preset REL
attributes that Mosaic recognises together with the graphic it uses for the toolbar button (on Windows 95 systems).
REL
="stylesheet"
TITLE
attribute is given.
REL
="home" ()
TITLE
attribute is given.
REL
="toc"|"contents" ()
REL
attribute value and Mosaic supplies 'ToC' if no TITLE
attribute is given.
REL
="index" ()
TITLE
attribute is given.
REL
="glossary" ()
TITLE
attribute is given.
REL
="copyright" ()
REL
attribute value. Mosaic supplies 'Copyright' if no TITLE
attribute is given.
REL
="up"|"parent" (|)
TITLE
is given.
REL
="child" ()
TITLE
is given.
REL
="next" ()
TITLE
attribute is given.
REL
="previous" ()
TITLE
attribute is given.
REL
="last"|"end" ()
TITLE
is given.
REL
="first" ()
TITLE
is given.
REL
="help" ()
TITLE
is given.
You can set the REL
attribute to be anything you like, as well as the above pre-sets. Mosaic will supply a default image () for these toolbar buttons and will use the text 'Bookmark' if no TITLE
attribute is provided.
Mosaic also supports use of the REV="made" attribute/value. This should be used to denote the author of the document and the HREF
attribute should use a HREF="mailto:spamaddress at TakeThisOuTsite.com"
structure. Mosaic will use its default graphic (see above) and default text ('Bookmark') if no TITLE
attribute is given.
The <LINK>
element represents one of the primary style sheet inclusion mechanism elements. It can be used to specify the location of the style sheet that is to be used for the document.
<HTML>
<HEAD>
<TITLE>This HTML document uses a style sheet</TITLE>
<LINK REL="stylesheet"
TYPE="text/css"
HREF="http://www.stylesheets.com/sheets/formal.css"
TITLE="formal">
</HEAD>
<BODY>
Rest of the document goes here
</BODY>
</HTML>
In the above HTML fragment, the <LINK>
element points to the file "formal.css" at the given URL. It tells the browser that :
TYPE
;
REL
ationship to the HTML document is that it is a "stylesheet";
TITLE
is "formal".
For more information about these specific attributes, see the <A>
section and for more general information about style sheets, see the style sheets section.
The <LINK>
element is also key to Netscape's 'dynamic fonts' concept, where the font specified in the <LINK>
element is automatically downloaded when the page is viewed. To do this, use REL="fontdef
in the <LINK>
element:
<LINK REL="fontdef" SRC="http://site/path/fontdef.pfr">
where the fontdef.pfr
file provides the font definition file. (Producing font definition files is outside the scope of this document. For more information, visit http://home.netscape.com/comprod/products/communicator/fonts/index.html. Also, note that Internet Explorer supports dynamic fonts, using standard W3C Style sheet methods. See the Style Sheets topic for more details.
DISABLED
This Internet Explorer 4.0 specific attribute specifies that the StyleSheet object referenced by the <LINK>
element is disabled. Basically, it means its style sheet declarations won't be used.
Consistent with Internet Explorer 4.0's Dynamic HTML object model, the <LINK>
element supports various properties and methods. In its role as a document structure element/relationship describer, it supports a few events. Note that all scripting of the <LINK>
element is Internet Explorer 4.0 specific.
<LINK...>
Properties
Of the Standard Dynamic HTML properties, <BASE>
supports className, document, id, parentElement, sourceIndex, tagName and title. See the Standard Dynamic HTML properties topic for details.
Also, the <LINK>
element supports the href, disabled and rel properties, which directly reflect any settings of their respective attributes (see above) and the readyState property.
The readyState
property can be one of 4 values, depending on the current state of the resource, referenced in the HREF
attribute. The possible values of the readyState
property are:
Value | Meaning |
complete |
The resource has completely loaded and is available to the document and therefore manipulation. |
interactive |
The resource hasn't completely downloaded, but is available to the document and scripting |
loading |
The resource is being downloaded |
uninitialized |
The resource is not available - normally, this value indicates that the resource is downloading |
Note that the readystate
property is read-only.
<LINK...>
Methods
Of the Standard Dynamic HTML methods, <LINK>
supports contains, getAttribute, removeAttribute and setAttribute. See the Standard Dynamic HTML methods topic for details.
<LINK...>
Events
The <LINK>
element doesn't support any of the Standard Dynamic HTML events, but does support the following events.
onerror
This event is fired when an error occurs in the downloading of the links resource referenced on the HREF
attribute. Normally, this would mean that the resource hasn't downloaded properly and so isn't available to the document, or manipulation through scripting.
onload
The onload
event is fired immediately after the resource begins downloading. It does not mean that the resource is available, merely that its download has begun.
onreadystatechange
At any time, the resource may change its readyState
property and when this happens, the onreadystatechange
event is fired.
© 1995-1998, Stephen Le Hunte
See also:
file: /Techref/language/html/ib/Document_Structure_Elements/link.htm, 13KB, , updated: 2006/8/15 21:11, local time: 2024/11/15 03:53,
3.137.172.53:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.ecomorder.com/Techref/language/html/ib/Document_Structure_Elements/link.htm"> <LINK></A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.