1 | <HTML>
|
---|
2 | <!-- This file is part of the HTML Reference Library ('HTMLib') -->
|
---|
3 | <!-- It should not be used outside of the HTMLib package -->
|
---|
4 | <!-- The HTMLib is © 1995-1998 Stephen Le Hunte -->
|
---|
5 | <!-- htmlib@htmlib.demon.co.uk -->
|
---|
6 | <HEAD>
|
---|
7 | <LINK REL="stylesheet" HREF="../style.css" TYPE="text/css">
|
---|
8 | <TITLE><LINK></TITLE>
|
---|
9 | </HEAD>
|
---|
10 | <BODY TOPMARGIN="0" BGCOLOR="#FFFFE0" TEXT="#000000">
|
---|
11 |
|
---|
12 | <CENTER>
|
---|
13 | <SPAN CLASS="NSRtitle"><LINK...></SPAN>
|
---|
14 | </CENTER>
|
---|
15 |
|
---|
16 | <P>The Link element indicates a relationship between the document and some other object. A document may have any number of Link elements.
|
---|
17 | <P>The Link element is empty (does not have a closing element), but takes the same attributes as the <A HREF="../Anchors/anchor.htm">Anchor</A> element.
|
---|
18 | <P>The <CODE><LINK></CODE> 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. <STRONG>Mosaic</STRONG> (v3.0 for Windows 95/NT4) totally supports the <CODE><LINK></CODE> element and presents the user with a toolbar populated with buttons for every <CODE><LINK></CODE> element specified.<CODE><LINK <SPAN CLASS="attr">REL</SPAN>="..."></CODE> is one that Mosaic recognises, it will show the toolbar button with a pre-set graphic, together with whatever text is specified in the <SPAN CLASS="attr">TITLE</SPAN> attribute, as the text on the button. The remote location, specified in the <SPAN CLASS="attr">HREF</SPAN> attribute is the location that Mosaic will browse to when the button is clicked. Below is a list of the possible preset <CODE>REL</CODE> attributes that Mosaic recognises together with the graphic it uses for the toolbar button (on Windows 95 systems).
|
---|
19 |
|
---|
20 | <DL>
|
---|
21 | <DT><CODE>REL</CODE>="stylesheet"
|
---|
22 | <DD>This details the stylesheet to be used for the current page. <STRONG>Internet Explorer</STRONG> (from v3.0) and <STRONG>Netscape</STRONG> (from v4.0) supports style sheets and Mosaic presents no pre-set graphic for this but supplies 'Stylesheet' if no <CODE>TITLE</CODE> attribute is given.
|
---|
23 | <DT><CODE>REL</CODE>="home" (<IMG SRC="../images/home.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="16">)
|
---|
24 | <DD>This can be used to link to any page that the browser should consider the 'home' page of the current site. Supplies 'Home' if no <CODE>TITLE</CODE> attribute is given.
|
---|
25 | <DT><CODE>REL</CODE>="toc"|"contents" (<IMG SRC="../images/toc.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="14">)
|
---|
26 | <DD>This directs users to the table of contents for your site. 'toc' and 'contents' are interchangeable as the <CODE>REL</CODE> attribute value and Mosaic supplies 'ToC' if no <CODE>TITLE</CODE> attribute is given.
|
---|
27 | <DT><CODE>REL</CODE>="index" (<IMG SRC="../images/index.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="14">)
|
---|
28 | <DD>This can be used to link to the index of your site. Supplied with 'Index' if no <CODE>TITLE</CODE> attribute is given.
|
---|
29 | <DT><CODE>REL</CODE>="glossary" (<IMG SRC="../images/gloss.gif" ALIGN="absmiddle" WIDTH="16" HEIGHT="14">)
|
---|
30 | <DD>This creates a link to the glossary of your site. Supplies 'Glossary' if no <CODE>TITLE</CODE> attribute is given.
|
---|
31 | <DT><CODE>REL</CODE>="copyright" (<IMG SRC="../images/copyr.gif" ALIGN="absmiddle" WIDTH="15" HEIGHT="15">)
|
---|
32 | <DD>If your site contains a page detailing copyright attributions, it can be linked to by this <CODE>REL</CODE> attribute value. Mosaic supplies 'Copyright' if no <CODE>TITLE</CODE> attribute is given.
|
---|
33 | <DT><CODE>REL</CODE>="up"|"parent" (<IMG SRC="../images/up2.gif" ALIGN="absmiddle" WIDTH="15" HEIGHT="14">|<IMG SRC="../images/parent.gif" ALIGN="middle" WIDTH="14" HEIGHT="16">)
|
---|
34 | <DD>This can be used to set the location of the current documents parent document. For example, your site may conform to a fairly rigid navigation structure and this attribute value can be used to link the current document to an overview of the current document set. Supplied with 'Up' or 'Parent' if no <CODE>TITLE</CODE> is given.
|
---|
35 | <DT><CODE>REL</CODE>="child" (<IMG SRC="../images/child.gif" ALIGN="absmiddle" WIDTH="15" HEIGHT="16">)
|
---|
36 | <DD>This can be used to set the location of the current documents 'child' document(s). For example, your site may conform to a fairly rigid navigation structure and this attribute value can be used to link the current document to any of the documents in the level below. I.e. from an overview document to a detail document. Supplied with 'Child' if no <CODE>TITLE</CODE> is given.
|
---|
37 | <DT><CODE>REL</CODE>="next" (<IMG SRC="../images/next.gif" ALIGN="absmiddle" WIDTH="14" HEIGHT="15">)
|
---|
38 | <DD>As in the above case, this can be used to provide a link to the next document in the current document set. Mosaic supplies 'Next' if no <CODE>TITLE</CODE> attribute is given.
|
---|
39 | <DT><CODE>REL</CODE>="previous" (<IMG SRC="../images/previous.gif" ALIGN="absmiddle" WIDTH="14" HEIGHT="15">)
|
---|
40 | <DD>As above, this can be used to link to the previous document in the flow of the current document set. Supplied with 'Previous' if no <CODE>TITLE</CODE> attribute is given.
|
---|
41 | <DT><CODE>REL</CODE>="last"|"end" (<IMG SRC="../images/last.gif" ALIGN="absmiddle" WIDTH="14" HEIGHT="13">)
|
---|
42 | <DD>This can be used to link to the last document in the current document set. Mosaic supplies 'End' if no <CODE>TITLE</CODE> is given.
|
---|
43 | <DT><CODE>REL</CODE>="first" (<IMG SRC="../images/first.gif" ALIGN="absmiddle" WIDTH="18" HEIGHT="13">)
|
---|
44 | <DD>This can be used to link to the first document in the current document set. Mosaic supplies 'Begin' if no <CODE>TITLE</CODE> is given.
|
---|
45 | <DT><CODE>REL</CODE>="help" (<IMG SRC="../images/help.gif" ALIGN="absmiddle" WIDTH="12" HEIGHT="16">)
|
---|
46 | <DD>If your site contains a 'help' file (i.e. tips on site navigation for example), then it can be linked to via this attribute setting. Mosaic supplies 'Help' if no <CODE>TITLE</CODE> is given.
|
---|
47 | </DL>
|
---|
48 |
|
---|
49 | <P>You can set the <CODE>REL</CODE> attribute to be anything you like, as well as the above pre-sets. Mosaic will supply a default image (<IMG SRC="../images/default.gif" ALIGN="absmiddle" WIDTH="17" HEIGHT="17">) for these toolbar buttons and will use the text 'Bookmark' if no <CODE>TITLE</CODE> attribute is provided.
|
---|
50 |
|
---|
51 | <P><STRONG>Mosaic</STRONG> also supports use of the <SPAN CLASS="attr">REV</SPAN>="made" attribute/value. This should be used to denote the author of the document and the <CODE>HREF</CODE> attribute should use a <CODE>HREF="mailto:address@site.com"</CODE> structure. Mosaic will use its default graphic (see above) and default text ('Bookmark') if no <CODE>TITLE</CODE> attribute is given.
|
---|
52 |
|
---|
53 | <P>The <CODE><LINK></CODE> element represents one of the primary <A HREF="../Style_Sheets/ov.htm">style sheet</A> inclusion mechanism elements. It can be used to specify the location of the style sheet that is to be used for the document.
|
---|
54 |
|
---|
55 | <SPAN CLASS="egcode">
|
---|
56 | <BLOCKQUOTE>
|
---|
57 | <CODE><HTML><BR>
|
---|
58 | <HEAD><BR>
|
---|
59 | <TITLE>This HTML document uses a style sheet</TITLE><BR>
|
---|
60 | <STRONG><LINK</STRONG> REL="stylesheet" <BR>
|
---|
61 | TYPE="text/css" <BR>
|
---|
62 | HREF="http://www.stylesheets.com/sheets/formal.css" <BR>
|
---|
63 | TITLE="formal"><BR>
|
---|
64 | </HEAD><BR>
|
---|
65 | <BODY><BR>
|
---|
66 | Rest of the document goes here<BR>
|
---|
67 | </BODY><BR>
|
---|
68 | </HTML>
|
---|
69 | </CODE>
|
---|
70 | </BLOCKQUOTE>
|
---|
71 | </SPAN>
|
---|
72 |
|
---|
73 | <P>In the above HTML fragment, the <CODE><LINK></CODE> element points to the file "formal.css" at the given URL. It tells the browser that :
|
---|
74 | <UL>
|
---|
75 | <LI>the file addressed is a style sheet, by explicitly giving the "text/css" MIME <CODE>TYPE</CODE>;
|
---|
76 | <LI>the file's <CODE>REL</CODE>ationship to the HTML document is that it is a "stylesheet";
|
---|
77 | <LI>the stylesheet's <CODE>TITLE</CODE> is "formal".
|
---|
78 | </UL>
|
---|
79 | <P>For more information about these specific attributes, see the <CODE><A HREF="../Anchors/anchor.htm"><A></A></CODE> section and for more general information about style sheets, see the <A HREF="../Style_Sheets/ov.htm">style sheets</A> section.
|
---|
80 |
|
---|
81 | <P>The <CODE><LINK></CODE> element is also key to <STRONG>Netscape</STRONG>'s 'dynamic fonts' concept, where the font specified in the <CODE><LINK></CODE> element is automatically downloaded when the page is viewed. To do this, use <CODE>REL="fontdef</CODE> in the <CODE><LINK></CODE> element:
|
---|
82 |
|
---|
83 | <SPAN CLASS="egcode">
|
---|
84 | <BLOCKQUOTE>
|
---|
85 | <CODE><LINK <STRONG>REL="fontdef"</STRONG> SRC="http://site/path/fontdef.pfr">
|
---|
86 | </CODE>
|
---|
87 | </BLOCKQUOTE>
|
---|
88 | </SPAN>
|
---|
89 |
|
---|
90 | <P>where the <CODE>fontdef.pfr</CODE> file provides the font definition file. <!-- (Producing font definition files is outside the scope of this document. For more information, visit <A HREF="http://home.netscape.com/comprod/products/communicator/fonts/index.html" TITLE="View Netscape's Dynamic fonts information" CLASS="external">http://home.netscape.com/comprod/products/communicator/fonts/index.html</A>. --> Also, note that <STRONG>Internet Explorer</STRONG> supports dynamic fonts, using standard W3C Style sheet methods. See the <A HREF="../Style_Sheets/ov.htm" TITLE="View the style sheets overview">Style Sheets</A> topic for more details.
|
---|
91 |
|
---|
92 | <P><A NAME="DISABLED"><SPAN CLASS="attr">DISABLED</SPAN></A><BR>
|
---|
93 | This <STRONG>Internet Explorer</STRONG> 4.0 specific attribute specifies that the <A HREF="../Scripting_Reference/sso.htm" TITLE="View the StyleSheet object topic">StyleSheet object</A> referenced by the <CODE><LINK></CODE> element is disabled. Basically, it means its style sheet declarations won't be used.
|
---|
94 |
|
---|
95 | <P><HR WIDTH="75%" ALIGN="center">
|
---|
96 |
|
---|
97 | <P><A NAME="SCRIPTING">Consistent</A> with <STRONG>Internet Explorer</STRONG> 4.0's <A HREF="../Dynamic_HTML/dhtml.htm" TITLE="View the Dynamic HTML overview">Dynamic HTML</A> object model, the <CODE><LINK></CODE> 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 <CODE><LINK></CODE> element is <STRONG>Internet Explorer</STRONG> 4.0 specific.
|
---|
98 |
|
---|
99 | <P><A NAME="LINK_Properties" TITLE=""><STRONG><CODE><LINK...></CODE> Properties</STRONG></A><BR>
|
---|
100 | Of the <A HREF="../Dynamic_HTML/dhtmlp.htm" TITLE="View the Standard Dynamic HTML properties topic">Standard Dynamic HTML properties</A>, <CODE><BASE></CODE> supports <SPAN CLASS="attr">className</SPAN>, <SPAN CLASS="attr">document</SPAN>, <SPAN CLASS="attr">id</SPAN>, <SPAN CLASS="attr">parentElement</SPAN>, <SPAN CLASS="attr">sourceIndex</SPAN>, <SPAN CLASS="attr">tagName</SPAN> and <SPAN CLASS="attr">title</SPAN>. See the <A HREF="../Dynamic_HTML/dhtmlp.htm" TITLE="View the Standard Dynamic HTML properties topic">Standard Dynamic HTML properties</A> topic for details.
|
---|
101 | <BR>
|
---|
102 | Also, the <CODE><LINK></CODE> element supports the <SPAN CLASS="attr">href</SPAN>, <SPAN CLASS="attr">disabled</SPAN> and <SPAN CLASS="attr">rel</SPAN> properties, which directly reflect any settings of their respective attributes (see above) and the <SPAN CLASS="attr">readyState</SPAN> property.
|
---|
103 |
|
---|
104 | <P><A NAME="propreadystate">The</A> <CODE>readyState</CODE> property can be one of 4 values, depending on the current state of the resource, referenced in the <CODE>HREF</CODE> attribute. The possible values of the <CODE>readyState</CODE> property are:
|
---|
105 | <P>
|
---|
106 | <CENTER>
|
---|
107 | <TABLE BORDER="0" WIDTH="100%">
|
---|
108 | <TR>
|
---|
109 | <TD><STRONG>Value</STRONG></TD>
|
---|
110 | <TD><STRONG>Meaning</STRONG></TD>
|
---|
111 | </TR>
|
---|
112 | <TR>
|
---|
113 | <TD VALIGN="top"><CODE>complete</CODE></TD>
|
---|
114 | <TD>The resource has completely loaded and is available to the document and therefore manipulation.</TD>
|
---|
115 | </TR>
|
---|
116 | <TR>
|
---|
117 | <TD VALIGN="top"><CODE>interactive</CODE></TD>
|
---|
118 | <TD>The resource hasn't completely downloaded, but is available to the document and scripting</TD>
|
---|
119 | </TR>
|
---|
120 | <TR>
|
---|
121 | <TD VALIGN="top"><CODE>loading</CODE></TD>
|
---|
122 | <TD>The resource is being downloaded</TD>
|
---|
123 | </TR>
|
---|
124 | <TR>
|
---|
125 | <TD VALIGN="top"><CODE>uninitialized</CODE></TD>
|
---|
126 | <TD>The resource is not available - normally, this value indicates that the resource is downloading</TD>
|
---|
127 | </TR>
|
---|
128 | </TABLE>
|
---|
129 | </CENTER>
|
---|
130 |
|
---|
131 | <P>Note that the <CODE>readystate</CODE> property is read-only.
|
---|
132 |
|
---|
133 | <P><A NAME="LINK_Methods" TITLE=""><STRONG><CODE><LINK...></CODE> Methods</STRONG></A><BR>
|
---|
134 | Of the <A HREF="../Dynamic_HTML/dhtmlm.htm" TITLE="View the Standard Dynamic HTML methods topic">Standard Dynamic HTML methods</A>, <CODE><LINK></CODE> supports <SPAN CLASS="attr">contains</SPAN>, <SPAN CLASS="attr">getAttribute</SPAN>, <SPAN CLASS="attr">removeAttribute</SPAN> and <SPAN CLASS="attr">setAttribute</SPAN>. See the <A HREF="../Dynamic_HTML/dhtmlm.htm" TITLE="View the Standard Dynamic HTML methods topic">Standard Dynamic HTML methods</A> topic for details.
|
---|
135 |
|
---|
136 | <P><A NAME="Events" TITLE=""><STRONG><CODE><LINK...></CODE> Events</STRONG></A><BR>
|
---|
137 | The <CODE><LINK></CODE> element doesn't support any of the <A HREF="../Dynamic_HTML/dhtmle.htm" TITLE="View the Standard Dynamic HTML events topic">Standard Dynamic HTML events</A>, but does support the following events.
|
---|
138 |
|
---|
139 | <P><A NAME="onerror"><SPAN CLASS="attr">onerror</SPAN></A><BR>
|
---|
140 | This event is fired when an error occurs in the downloading of the links resource referenced on the <CODE>HREF</CODE> attribute. Normally, this would mean that the resource hasn't downloaded properly and so isn't available to the document, or manipulation through scripting.
|
---|
141 |
|
---|
142 | <P><A NAME="onload"><SPAN CLASS="attr">onload</SPAN></A><BR>
|
---|
143 | The <CODE>onload</CODE> event is fired immediately after the resource begins downloading. It does not mean that the resource is available, merely that its download has begun.
|
---|
144 |
|
---|
145 | <P><A NAME="onreadystatechange"><SPAN CLASS="attr">onreadystatechange</SPAN></A><BR>
|
---|
146 | At any time, the resource may change its <CODE>readyState</CODE> property and when this happens, the <CODE>onreadystatechange</CODE> event is fired.
|
---|
147 |
|
---|
148 | <P>
|
---|
149 |
|
---|
150 | <P ALIGN="right" CLASS="copyright">© 1995-1998, Stephen Le Hunte</P>
|
---|
151 | </BODY>
|
---|
152 | </HTML>
|
---|