The Anchor tag is one of the most powerful tags you will use. The biggest use is to make some text or an image into a hyperlink which is one of the compelling features of the internet. The anchor tag may also be used to mark a specific place vertically on a page and a hyperlink is used to take you there. Perhaps another page, or in this case, somewhere on the same page.
The anatomy of an anchor tag is like any other tag, including name, attribute and value. Let's have a look at a link to Yahoo:
| < | a | href= | "http://www.yahoo.com" | > | Go to Yahoo! | </a> | |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Use the anchor tag to surround text or images that you wish to be a link. It can be confusing though, if you make too much text at once into a link. All that blue and underlining are just too much for the eye (if you know what I mean). Kind of annoying to the eye. OK, I'll stop now.
Anchor tags are also used to define or mark a particular place on the page. In the hyperlink example above (there), the link goes to an anchor at the bottom of the page which looks like this: <a name="bottom"></a>.
Like the bottom of the page! Back to the top...