home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / the_web / documents / spec / html_spec / hyperlink_sg < prev    next >
Encoding:
Text File  |  1995-08-04  |  6.6 KB  |  171 lines

  1. <h1 id=hyperlink>Hyperlinks
  2.  
  3. <p> In addition to general purpose elements such as paragraphs and
  4. lists, HTML documents can express hyperlinks. An HTML user agent
  5. allows the user to navigate these hyperlinks.
  6.  
  7. <p> A hyperlink is a relationship between two anchors, called the head
  8. and the tail of the hyperlink[DEXTER]. Each anchor is addressed, or
  9. uniquely identified, by an absolute Uniform Resource Identifier (URI),
  10. optionally followed by a '#' and a sequence of characters called a
  11. fragment identifier, as per [RELURL]. For example:
  12.  
  13. <listing><![CDATA[
  14. http://www.w3.org/hypertext/WWW/TheProject.html
  15. http://www.w3.org/hypertext/WWW/TheProject.html#z31
  16. ]]>
  17. </listing>
  18.  
  19. <p>In an anchor address, the URI refers to a resource; it may be used
  20. in a variety of information retrieval protocols to obtain an entity
  21. that represents the resource, such as an HTML document. The fragment
  22. identifier, if present, refers to some view on, or portion of the
  23. resource.
  24.  
  25. <p>An HTML user agent begins navigation with an absolute URI, called
  26. the base URI, and an HTML document that is a representation of the
  27. resource identified by the base URI.
  28.  
  29. <p> Each of the following markup constructs indicates the tail anchor
  30. of a hyperlink or set of hyperlinks:
  31.  
  32. <ul>
  33. <li> <tag/A/ elements with <attr/HREF/ present.
  34. <li> <tag/LINK/ elements.
  35. <li> <tag/IMG/ elements.
  36. <li> <tag/INPUT/ elements with the <attr/SRC/ attribute present.
  37. <li> <tag/ISINDEX/ elements.
  38. <li> <tag/FORM/ elements with <code/METHOD=GET/.
  39. </ul>
  40.  
  41. <p>These markup constructs refer to head anchors either directly by
  42. means of an absolute URI, or indirectly by means of a relative URI,
  43. which must be combined with the base URI as in [RELURL] to determine
  44. the address of the head anchor. The markup may also include fragment
  45. identifiers, separeted from the URI by a '#' character.
  46.  
  47. <h2>Accessing Resources
  48.  
  49. <p>Once the address of the head anchor is determined, the user agent
  50. may obtain a representation of the resource, for example as in [URL].
  51.  
  52. <p>For example, if the base URI is <code>http://host/x/y.html</> and
  53. the document contains:
  54.  
  55. <listing><![CDATA[
  56. <img src="../icons/abc.gif">
  57. ]]>
  58. </listing>
  59.  
  60. <p> then the user agent uses the URI
  61. <code>http://host/icons/abc.gif</> to access the resource linked from
  62. the <tag/IMG/ element.
  63.  
  64. <p>If the URI in the address of the head anchor is the same as the
  65. base URI, then the base document is sufficient as a representation of
  66. the resource. A user agent must <emph/not/, for example, use any network
  67. information retrieval protocols to obtain a new representation of the
  68. resourse.
  69.  
  70. <h2 id=traverse>Activation of Hyperlinks
  71.  
  72. <p>An HTML user agent allows the user to navigate the content of the
  73. document and request activation of hyperlinks denoted by <tag/A/
  74. elements. HTML user agents should also allow activation of <tag/LINK/
  75. element hyperlinks.
  76.  
  77. <p> To activate a link, the user agent obtains a representation of the
  78. resource identified in the address of the head anchor. If the
  79. representation is another HTML document, navigation may begin again
  80. with this new document. The base URI for navigation is taken from the
  81. head anchor by default; however, any <tag/BASE/ tag in the destination
  82. document overrides this default. The process of obtaining the
  83. destination document may also override the base URI, as in the case of
  84. an HTTP <code/URI:/ header or redirection transaction.
  85.  
  86. <h2 id=image-present>Simultaneous Presentation of Image Resources
  87.  
  88. An HTML user agent may activate hyperlinks indicated by <tag/IMG/ and
  89. <tag/INPUT/ elements concurrently with processing the document; that
  90. is, image hyperlinks may be processed without explicit request by the
  91. user. Image resources should be embedded in the presentation at the
  92. point of the tail anchor, that is the <tag/IMG/ or <tag/INPUT/ element.
  93.  
  94. <tag/LINK/ hyperlinks may also be processed without explicit user
  95. request; for example, style sheet resources may be processed before or
  96. during the processing of the document.
  97.  
  98. <h2>Fragment Identifiers
  99.  
  100. Any characters following a <code/#/ character in a hypertext address
  101. constitute a fragment identifier. As a degenerate case, an address of
  102. the form <code/#fragment/ refers to an anchor in the same document.
  103.  
  104. The meaning of fragment identifiers depends on the media type of the
  105. representation of the anchor's resource. For <code>text/html</>
  106. representations, it refers to the <tag/A/ element with a <attr/NAME/
  107. attribute whose value is the same as the fragment identifier. The
  108. matching is case sensitive. The document should have exactly one such
  109. element. The user agent should indicate the anchor element, for
  110. example by scrolling to and/or highlighting the phrase.
  111.  
  112. For example, if the base URI is <code>http://host/x/y.html</> and the
  113. user activated the link denoted by the following markup:
  114.  
  115. <listing>
  116. <![CDATA[
  117. <p> See: <a href="app1.html#bananas">appendix 1</a> 
  118. for more detail on bananas.
  119. ]]>
  120. </listing>
  121.  
  122. <p>Then the user agent accesses the resource identified by
  123. <code>http://host/x/app1.html</>. Assuming the resource is represented
  124. using the <code>text/html</> media type, the user agent must locate
  125. the <tag/A/ element whose <attr/NAME/ attribute is <code>bananas</>
  126. and begin navigation there.
  127.  
  128. <h2 id=query>Queries and Indexes
  129.  
  130. <p> The <tag/ISINDEX/ element represents a set of hyperlinks. The user
  131. can choose from the set by providing keywords to the user agent. The
  132. user agent computes the head URI by appending <code/?/ and the
  133. keywords to the base URI. The keywords are escaped according to [URL]
  134. and joined by <code/+/. For example, if a document contains:
  135.  
  136. <listing><![CDATA[
  137. <BASE HREF="http://host/index">
  138. <ISINDEX>
  139. ]]></listing>
  140.  
  141. <p> and the user provides the keywords <code/apple/ and <code/berry/,
  142. then the user agent must access the resource
  143. <code>http://host/index?apple+berry</>.
  144.  
  145. <p> <tag/FORM/ elements with <code/METHOD=GET/ also represent sets of
  146. hyperlinks. See <hdref refid=queryf> for details.
  147.  
  148. <h2 id=imagemap>Image Maps
  149.  
  150. <p> If the <attr/ISMAP/ attribute is present on an <tag/IMG/ element,
  151. the <tag/IMG/ element must be contained in an <tag/A/ element with an
  152. <attr/HREF/ present. This construct represents a set of
  153. hyperlinks. The user can choose from the set by choosing a pixel of
  154. the image. The user agent computes the head URI by appending <code/?/
  155. and the x and y coordinates of the pixel to the URI given in the
  156. <tag/A/ element. For example, if a document contains:
  157.  
  158. <listing><![CDATA[
  159. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  160. <head><title>ImageMap Example</title>
  161. <BASE HREF="http://host/index"></head>
  162. <body>
  163. <p> Choose any of these icons:<br>
  164. <a href="/cgi-bin/imagemap"><img ismap src="icons.gif"></a>
  165. ]]></listing>
  166.  
  167. <p> and the user chooses the upper-leftmost pixel, the chosen
  168. hyperlink is the one with the URI
  169. <code>http://host/cgi-bin/imagemap?0,0</>.
  170.  
  171.