Up to now, we've seen how to create links to other documents using both absolute and relative references. You can also create hypertext links to sections within documents. The first step is to create a named section using the anchor tags (
<A> </A> ) with the parameter
NAME (instead of
HREF). For example, the heading to this section uses the following tag:
In order to create a link to this section within this document, you would use
HREF with a hash mark (
# ) followed by the section name. If you wanted to provide a way to go back to the heading at the top of this page, the link would be:
Selecting that link would take you to the top of this document. Want to try it? Go back to
top of page.
You can also use this to go to specific sections of other documents. If you wanted to link to the heading of this page from another document, the link would look like this:
Selecting that link would take you to Part 2 of the guide (the file
4.html , which is a relative reference) and then go to the section named
view.
When creating named sections, be careful with your spelling and case. These references can be case sensitive!