Links: HTML
Create Internal Links

Review of Hyperlinks A hyperlink is a direct connection from the current location of the cursor to another location.

You can create an absolute hyperlink to another web site.

You can create a relative hyperlink to another document within your own web site.

You can create a mailto hyperlink to an email message preaddressed to whoever you designate.

Internal Hyperlinks You can also create an internal hyperlink to another position in your current document.

For example, you may want to place a hyperlink at the bottom of a web page that will take the visitor back up to the top of that same web page.

Or you might want to provide a short table of the contents of a particular web page and link each item in the table of contents to the exact position farther down on the web page where the discussion of that item begins.

Bookmarks When we create this internal hyperlink we are hyperlinking to a place on the web page that is variously referred to as a bookmark, a marker, or a target.
To create such a bookmark, first position your cursor on the page location you want your visitors to leap to when they click on the hyperlink.

Using our first example--a hyperlink at the bottom of a page to allow visitors to jump directly back to the top of that same page--we would position our cursor next to a word in the first line of the page.

We would then create a bookmark or target for the hyperlink.  The HTML code for such a bookmark is:

<A NAME="[target]">[bookmark Location]</A>

where [target] is the word you have chosen to mark the spot and [bookmark location] is the place you want the cursor to jump to when you activate the hyperlink.

Next we would create a hyperlink to this bookmark.  The HTML is:

<A HREF="#[target]">[Clickable text]</A>

Note the use of the # sign in the tag.

Example So to create a hyperlink at the bottom of a page to send visitors to the top of the page you would:
  • Position your cursor next to a word at the top of the page.
  • Type <A NAME="top"></A>
  • Position your cursor at the desired location at the bottom of the page.
  • Type <A HREF="#top">Return to top of page</A>
Create a Bookmark to a Location in Another File You can also send visitors from one document to a bookmarked location in another document in your own web site. Use the following procedure:
  • Open the second document. Position your cursor at the desired bookmark location.
  • Type <A NAME="[target]"></A>
  • Return to the first document.  Create a hyperlink:
<A HREF="[filename.htm]#[target]">Clickable text </A>
where [filename.htm] is the file name of the second document.

Links: HTML
Overview
Create Absolute Links
Create Relative Links
Create Mailto Links
Create Internal Links
Open a Link in a New Window

 

Personal Home PageWeb Design CenterTutorial MenuTop of Page

Web Design Center
Last Revised: October 19, 2006
© Agatha Taormina