HTML Bookmark Tutorial
HTML refers to hypertext markup language, and its name is derived from its ability to link text and images from one document to another by creating hyperlinks. HTML bookmarks can be created either within the same document or between several documents. To create HTML bookmarks you first need to understand how to use the anchor tag, <a>. Anchor tags can be used either as "anchor links" to point the user to a different URL address, or as "named anchors" to point the user to different sections within the same document.
Instructions
-
Anchor Links
-
1
Locate the page URL you want to link to, such as http://www.google.com.
-
2
Place the anchor tag and target URL of the link. For example:
<a href="http://www.google.com">.
-
-
3
Insert the text or image that will serve as the hyperlink to the target URL, such as "Click Here." This text should go inside the close anchor tag, </a>. Your anchor tag should look similar to the following example:
<a href="http://www.google.com">Click Here</a>.
Named Anchors
-
4
Create a bookmark within the same document by specifying a named anchor within the document. For example:
<a name="bookmark1">Chapter One</a>.
-
5
Link to the specified bookmark from another location within the same document by creating an anchor link. For example:
<a href="#bookmark1">Go to Chapter One</a>.
-
6
Link to the specified bookmark from another document by specifying both the URL and the section. For example:
<a href=http://www.google.com#bookmark1>Go to Chapter One</a>.
-
1
Tips & Warnings
You can use anchor links to create a hyperlink to a specified email address. To enable the user to send an email to a specific email address, use the following HTML tag: <a href=mailto:name@address.com>Contact Us</a>.
You can use named anchors to create HTML bookmarks in a long document. They are often used to create a Table of Contents at the top of the document so that users can jump from one location to another without having to scroll through the whole document.
References
- Photo Credit Dynamic Graphics/Dynamic Graphics Group/Getty Images