HTML Bookmark Links
Description
You can create links to sections of an html page. This is useful if you have a long page that you want to allow the users to quickly navigate to different sections.
When a user clicks on a bookmark link in the current page the page will scroll so that the bookmark is at the very top of the page.
Examples
For example:
First you need to place a bookmark (named anchor) in your page where you want the user to be able to jump to:
<a name="bookmark1" >Bookmark1</a>
Then you need to add a link that the user can click on to jump to the bookmark:
<a href="#bookmark1">goto bookmark1</a>
note: you can link to a bookmark on a different page but pre-pending the url of the page to the bookmark name in the href attribute:
<a href="http://website.com/alargepage.html#bookmark1">
goto bookmark1
</a>
Attributes for <a>
| href |
url
|
Specifies the url of the destination |
| title |
text
|
the title of the target document |
| target |
name _blank _self _parent _top |
the window or frame the linked to document should be displayed. _blank opens a new browser window |
| accesskey |
a single character e.g. a |
Specifies an shorcut key used to access the link from the keyboard. |
| tabindex |
number |
Specifies the tab index. When a user presses the tab key the focus is moved to each element in the tabindex order. This is useful when there are many links as the user can tab through each link |
| name |
text
|
Used to create a named anchor. Specifies the name of a part of the document (a fragment). You can link to fragments using the href attribute by pre-pending # to the name |
| rel |
next prev head toc parent child index glossary |
Creates a relationship between the current page and the target page. |
| rev |
next prev head toc parent child index glossary |
The relationship from the target page back to the source page. |