Working with Anchors


This page provides a simple setup for the use of anchors. Anchors create links within a page (rather than a link to another page or elsewhere on the internet). Check how the links work back and forth from apples, pears and bananas, and then back to the top of the page. To see how it is done, play with the sample section about fruits further down the page then view the source code. A segment is shown just below:


Important Tags:

Anchor Link <a href="#spottogo">Click to go</a>

Anchor Name <a name="spottogo">

How it works: an anchor is a link that goes to another part of the same page. For example, from the top of the Fruits page (scroll down) you might want visitors to jump to the section on pears. Add the Anchor Name tag just above the pear information within the page. Add the pear Anchor Link tag to the word pear in the index. When a visitor clicks on the word or image you've included in the Anchor Link tag, they will jump to the corresponding Anchor Name. Anchor Names and Anchor Links work up and down a page. You can have multiple sets of Anchor Names and Anchor Links.




All about Fruits


Apples Pears Bananas


Apples

Back to Top

Bananas

Back to Top

Pears

Back to Top

More on using Anchor tags

Sample page with HTML (off this site)

Last updated February 5, 1999
By Barbara Peskin
TWK Associates
twk@edstwk.com
Artwork in collaboration with eds designs
EDS Designs and TWK Associates sponsor
Pluto's Pages People and Pets Essay Contest