home *** CD-ROM | disk | FTP | other *** search
- <h1 id=hyperlink>Hyperlinks
-
- <p> In addition to general purpose elements such as paragraphs and
- lists, HTML documents can express hyperlinks. An HTML user agent
- allows the user to navigate these hyperlinks.
-
- <p> A hyperlink is a relationship between two anchors, called the head
- and the tail of the hyperlink[DEXTER]. Each anchor is addressed, or
- uniquely identified, by an absolute Uniform Resource Identifier (URI),
- optionally followed by a '#' and a sequence of characters called a
- fragment identifier, as per [RELURL]. For example:
-
- <listing><![CDATA[
- http://www.w3.org/hypertext/WWW/TheProject.html
- http://www.w3.org/hypertext/WWW/TheProject.html#z31
- ]]>
- </listing>
-
- <p>In an anchor address, the URI refers to a resource; it may be used
- in a variety of information retrieval protocols to obtain an entity
- that represents the resource, such as an HTML document. The fragment
- identifier, if present, refers to some view on, or portion of the
- resource.
-
- <p>An HTML user agent begins navigation with an absolute URI, called
- the base URI, and an HTML document that is a representation of the
- resource identified by the base URI.
-
- <p> Each of the following markup constructs indicates the tail anchor
- of a hyperlink or set of hyperlinks:
-
- <ul>
- <li> <tag/A/ elements with <attr/HREF/ present.
- <li> <tag/LINK/ elements.
- <li> <tag/IMG/ elements.
- <li> <tag/INPUT/ elements with the <attr/SRC/ attribute present.
- <li> <tag/ISINDEX/ elements.
- <li> <tag/FORM/ elements with <code/METHOD=GET/.
- </ul>
-
- <p>These markup constructs refer to head anchors either directly by
- means of an absolute URI, or indirectly by means of a relative URI,
- which must be combined with the base URI as in [RELURL] to determine
- the address of the head anchor. The markup may also include fragment
- identifiers, separeted from the URI by a '#' character.
-
- <h2>Accessing Resources
-
- <p>Once the address of the head anchor is determined, the user agent
- may obtain a representation of the resource, for example as in [URL].
-
- <p>For example, if the base URI is <code>http://host/x/y.html</> and
- the document contains:
-
- <listing><![CDATA[
- <img src="../icons/abc.gif">
- ]]>
- </listing>
-
- <p> then the user agent uses the URI
- <code>http://host/icons/abc.gif</> to access the resource linked from
- the <tag/IMG/ element.
-
- <p>If the URI in the address of the head anchor is the same as the
- base URI, then the base document is sufficient as a representation of
- the resource. A user agent must <emph/not/, for example, use any network
- information retrieval protocols to obtain a new representation of the
- resourse.
-
- <h2 id=traverse>Activation of Hyperlinks
-
- <p>An HTML user agent allows the user to navigate the content of the
- document and request activation of hyperlinks denoted by <tag/A/
- elements. HTML user agents should also allow activation of <tag/LINK/
- element hyperlinks.
-
- <p> To activate a link, the user agent obtains a representation of the
- resource identified in the address of the head anchor. If the
- representation is another HTML document, navigation may begin again
- with this new document. The base URI for navigation is taken from the
- head anchor by default; however, any <tag/BASE/ tag in the destination
- document overrides this default. The process of obtaining the
- destination document may also override the base URI, as in the case of
- an HTTP <code/URI:/ header or redirection transaction.
-
- <h2 id=image-present>Simultaneous Presentation of Image Resources
-
- An HTML user agent may activate hyperlinks indicated by <tag/IMG/ and
- <tag/INPUT/ elements concurrently with processing the document; that
- is, image hyperlinks may be processed without explicit request by the
- user. Image resources should be embedded in the presentation at the
- point of the tail anchor, that is the <tag/IMG/ or <tag/INPUT/ element.
-
- <tag/LINK/ hyperlinks may also be processed without explicit user
- request; for example, style sheet resources may be processed before or
- during the processing of the document.
-
- <h2>Fragment Identifiers
-
- Any characters following a <code/#/ character in a hypertext address
- constitute a fragment identifier. As a degenerate case, an address of
- the form <code/#fragment/ refers to an anchor in the same document.
-
- The meaning of fragment identifiers depends on the media type of the
- representation of the anchor's resource. For <code>text/html</>
- representations, it refers to the <tag/A/ element with a <attr/NAME/
- attribute whose value is the same as the fragment identifier. The
- matching is case sensitive. The document should have exactly one such
- element. The user agent should indicate the anchor element, for
- example by scrolling to and/or highlighting the phrase.
-
- For example, if the base URI is <code>http://host/x/y.html</> and the
- user activated the link denoted by the following markup:
-
- <listing>
- <![CDATA[
- <p> See: <a href="app1.html#bananas">appendix 1</a>
- for more detail on bananas.
- ]]>
- </listing>
-
- <p>Then the user agent accesses the resource identified by
- <code>http://host/x/app1.html</>. Assuming the resource is represented
- using the <code>text/html</> media type, the user agent must locate
- the <tag/A/ element whose <attr/NAME/ attribute is <code>bananas</>
- and begin navigation there.
-
- <h2 id=query>Queries and Indexes
-
- <p> The <tag/ISINDEX/ element represents a set of hyperlinks. The user
- can choose from the set by providing keywords to the user agent. The
- user agent computes the head URI by appending <code/?/ and the
- keywords to the base URI. The keywords are escaped according to [URL]
- and joined by <code/+/. For example, if a document contains:
-
- <listing><![CDATA[
- <BASE HREF="http://host/index">
- <ISINDEX>
- ]]></listing>
-
- <p> and the user provides the keywords <code/apple/ and <code/berry/,
- then the user agent must access the resource
- <code>http://host/index?apple+berry</>.
-
- <p> <tag/FORM/ elements with <code/METHOD=GET/ also represent sets of
- hyperlinks. See <hdref refid=queryf> for details.
-
- <h2 id=imagemap>Image Maps
-
- <p> If the <attr/ISMAP/ attribute is present on an <tag/IMG/ element,
- the <tag/IMG/ element must be contained in an <tag/A/ element with an
- <attr/HREF/ present. This construct represents a set of
- hyperlinks. The user can choose from the set by choosing a pixel of
- the image. The user agent computes the head URI by appending <code/?/
- and the x and y coordinates of the pixel to the URI given in the
- <tag/A/ element. For example, if a document contains:
-
- <listing><![CDATA[
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
- <head><title>ImageMap Example</title>
- <BASE HREF="http://host/index"></head>
- <body>
- <p> Choose any of these icons:<br>
- <a href="/cgi-bin/imagemap"><img ismap src="icons.gif"></a>
- ]]></listing>
-
- <p> and the user chooses the upper-leftmost pixel, the chosen
- hyperlink is the one with the URI
- <code>http://host/cgi-bin/imagemap?0,0</>.
-
-