Basic HTML Tutorial: Internal Links
Home > Build
> Programming > HTML
> Basic
HTML Tutorial
2.7 Internal Links
In addition to links within and outside of your
site, you can link to sections within your page. These links
are called anchors. The best time to use anchors is when you
have a long page, with plenty of information. It's a good
idea to provide a Table of Contents at the top of the page,
so that users can quickly jump to the sections of interest
to them.
To create an anchor, first you must create the
link, just as you would create any other link. Only instead
of placing a URL in the HREF part, you would use the # sign,
followed by the name of the anchor. Then create the link and
close the tag. The syntax is as follows:
<A HREF="#bottom">Click here
for the bottom of the page</A>
Once you have created a link to the anchor,
you must define the anchor itself. This must be done where
you want the link to transport the user to. In this instance,
you would go to the bottom of the page, and place the anchor
there. This is also done with the <A> tag. Only this
time, you defining the anchor simply by giving it a name.
In this case that name would be bottom.
<A NAME=bottom>Bottom of the page</A>
Using these examples, the user would be transported
to the bottom of the page.
2.8 Other Links