HTML BODY: Hyperlinks or Anchors
An anchor is a piece of text or some other object
(for example an image icon) which marks the beginning and/or the end
of a hypertext link.
The text between the opening and closing tags,
<A attributes> ...text... </A>
can be the start or destination (or both) of a link.
Don't omit the double quotes around URLs in anchors.
-
<a name="anchor_name"> . . .
</a>
- Define a target location in a document
-
<a href="#anchor_name"> . . .
</a>
- Link to a location in the same document.
A hash means that the link is to a tag internal to the document.
-
<a href="URL"> . . .
</a>
- Link to another file or resource
-
<a href="URL#anchor_name"> . . .
</a>
- Link to a target location in another document
-
<A HREF="image.jpeg">
<IMG SRC="icon.gif"> </A>
- The image `icon.gif' is a hypertext
link to the image file located in the same directory
as the currently accessed document (unless otherwise
specified by the BASE element).
-
<a href="mailto:email@isp.com"> . . .
</a>
- Link will invoke a pre-addressed email window.
-
<a href="mailto:email@isp.com?subject=new email"> . . .
</a>
- Link will invoke a pre-addressed email window with subject "new email"
-
<a href="URL?string1+string2..."> . . .
</a>
- Send one or more strings to a script. In this example, the
URL is a script, the ? is a separator, and the strings are
material processed by the script. This format is commonly used
for sending frequently-searched-for strings to a search engine.
An anchor must include a name or href attribute,
and may include both. There are several optional attributes, but they
are rarely encountered.
|