Internal Link


Send Them To The Exact Spot !

One use of an "internal link" is transport you to another part of the same web page. Perhaps you have seen this demonstrated when you arrive at the bottom of a web page and see a text link that says "To The Top" ? Then when you click on that link you are transported "to the top" of the web page. I will explain the two parts of this code here in this lesson.

PART 1: First you must assign a NAME to a part of your web page where you would like the viewer to end up after clicking a certain link. You can assign a NAME to any text or an image that is anywhere on your web page.

Here are a few ways to NAME your text or images. In our examples we will use the word "sample" as the NAME we will assign to our text or images, but any word will do. If you have more than one internal link pointing to different parts of your web page, use a unique word for each NAME.

To NAME some text do this: (this can be any text presently on the web page)
Some Text Is Here

To NAME an image do this: (this can be any image presently on the web page)
<A NAME="sample"><img src="url of image"></a>

If the text or image is already a clickable link, just add the NAME:

Here is an example for a NAME in clickable text:
<A NAME="sample" HREF="url">Whatever Text Is Here</a>

Here is an example for a NAME in a clickable an image:
<A NAME="sample" HREF="url"><img src="url of image"></a>

PART 2: A simple anchor created with the NAME you have assigned to your text or image will take you to that part of the page.

Here are examples of a text and an image link with the NAME we have used, "sample".

Note: Be sure to use the # in your code, or it WILL NOT WORK !

Here is an example for text:
<A HREF="#sample">Some Text Here</a>

Here is an example for an image:
<A HREF="#sample"><IMG SRC="url of image"></a>

Below is a working example of an internal link on the same web page. The banner at the top of this page is assigned a NAME (NAME="top"). The text link below will transport you up to that banner.