HyperText-Links: In the same page
Glossaries are often a single very long web page, with each subject having it's own heading.The two main parts of the code are;.
- First are the "start" anchors at the top.
<a href="#Subject 2"> Topic 2</a> etc
Second are the
"destination" anchors down the page. Each heading has an anchor tag with an attribute called a name.
The value of this name is Subject 2
<a name="Subject 2">Topic 2</a>
1. At the top of the Glossary page clicking on Topic 2 will move line Topic 2 to the top of the browser window.
When finished at Topic 2 the visitor may click on the browser back button to return to the top.
2. From a remote page.
If the visitor is on a different page and clicks on a link
<a href="Glossary.html#Subject 2"> Topic 2 </a>
then the browser will open Glossary.html with the anchor named [Subject 2] at the top of the screen. Using the back button will return the visitor to their previous page.
Note the "href" syntax from remote page.