Element used to define a hyperlink anchor (or this is how you link to other sites, pages or some point on this page or another page).
<html> <head> <title>Some Title</title> </head> <body> . . ==>> <A HREF="somepage.html">STUFF BETWEEN TAGS</A> . . </body> </html>
Everything I've read really makes this way too complicated so I'm going to try to make it simple enough for me to understand. In the example above, the text between the "A's" is going to appear highlighted or in a different color depending on the browser being used. When the viewer selects the text then the browser will load the page or site specified by the "HREF" address.
The address in the example will look for the file in the same location that the current page was taken from. If you want the viewer to be taken to another site then you would specify the address as "http://www.somewhere.com/somepage.html" or whatever it takes to get them there. If your page is in a subdirectory on the system where the current page is being viewed then you would specify the address as "./subdir/somepage.html".
Another form of the "A's" let's you mark a place on your page as somewhere you'd want the viewer to be able to jump to. Like when your page gets long and you want to make a little table of contents at the top so the user can go directly to a spot. Go to the spot you want to mark and do something like the following:
<A NAME="somename1">Some Text</A>
The text "Some Text" won't be highlighted or anything. You won't be able to tell that it is a "target" for a link by looking at it. The name you assign to this spot MUST be unique for this page.
To use the reference that you've created, on the same page, you would do something like the following:
<A HREF="#somename1">Some Text</A>
This creates a link to the spot you marked and when the viewer selects the text between the tags the browser will move to the marked spot on the page. If you wanted to create a link from another page to this target on this page then you would simply do it like:
<A HREF="somepage.html#somename1">Some Text</A>
One last little trick you can do that's kind of neat - use an image in place of the text between the tags. Just be sure to use the "ALT" element with the image so you have something highlighted in case the viewer isn't loading images.
Netscape
Nothing special.
Microsoft IE
Nothing special.
Internationalization
See HTML 3.0.
The Rusk Family . . . "the Legend
Continues"
All contents copyright © 1996,1997 Michael T. Rusk
All rights reserved.
Revised: December 03, 1997 10:48 AM
URL: ./htmlgd/taga.html