|
Okay, lets say you have one page that is pretty long. Maybe
you would like to give someone a way back to the top of the page
when they are at the bottom. Or maybe you want to divide it into
sections and use a table of contents at the top. Well, the way
to do this is to use a named anchor, which is a specific area
of your page you want to make a link to. You could link to any
part of the page, but for now, let's say you want to create a
link to the top of your page. To do this, go to the top of the
body section (right after the body tag). Now type the following
tag:
<A NAME="top"></A>
You can place any name you wish inside the quotes. This just
makes it easy to see where we are going to end up. Now, go anywhere
between the body tags and type this link:
<A HREF="#top">Back to the Top</A>
If you click on this link, you will be sent back to the top
of the page. You can try one I made on this page by clicking
on the link below:
Back to top
The # sign is there to let the browser know
the destination is a named anchor within this page. So, if
you create an anchor
named "cool", you link to that anchor by using "#cool", like
this:
<A NAME="cool"></A> -----The
anchor name
<A HREF="#cool">To the Cool Section of this page</A> -----Linking
to the named section
You can place a named anchor anyplace on your page. You can
link to it from any other part of the page. You can place one
at the third paragraph, the bottom, the top, the 500th word.....
It can make navigating some pages a whole lot easier.
|