Basic Guide For Writing Web Pages -- Introduction / Table Of Contents / Previous Page / Next Page

Basic Web Page Writing Step 14
Links to Sections of Your Page


In step 13 you saw how to create a link to another one of your pages and return back to the previous page. It is also possible to jump to sections of one page or another page and return back to the exact spot that you left.


This step will show you how to insert a TARGET at the point to where you want to jump. The Target uses the NAME= option added to the ANCHOR tags.

Creating a Link Within Your Page

It is easy to create hyperlinks within your page that can be "clicked" by the reader to jump to another part of the document. You first have to write a link to the section you want to go to and give it a name, then insert the target named anchor at the point you want to jump to. These are the two steps that need to be completed.

1) INSERT A LINK to be clicked to cause the jump. 
            The Link looks like this: 
               <A HREF="#TARGET NAME HERE"&GT; LINK TEXT&LT;/A&GT;
2) INSERT A TARGET at the point to which you want the link to jump to.
             A TARGET looks like this:
               <A NAME="TARGET NAME HERE"&GT;TARGET TEXT&LT;/A&GT;
The # symbol tells the web browser to look through the document for a named anchor called "TARGET" or in the example below, named "JUMP". When someone clicks on the hypertext, it brings that part of the document to the top of the screen. (Note: The target text is what you want to appear as the link item shown to the user.)

NOTE: FILE NAMES SHOULD BE LOWER CASE.
       UPPER CASE IS USED HERE ONLY FOR EASE OF VIEWING.
The following example will take you to a section at the bottom of this page section highlighted between two wide lines.

This is where you would INSERT the LINK

<A HREF="#JUMP">GO TO TARGET</A>

Which produces the following Link to the Target point:

Go To Target

YOU MADE IT BACK

After you return, the above line is here as a target to get back.
You'll see the link part of this when you click on the above and jump to the end of the page.
The Above line was created with the following line.
The link was named BACK.
<A NAME="BACK"> YOU MADE IT BACK</A>


Creating A Jump Link To Another Of Your Pages and Back

NOTE: FILE NAMES SHOULD BE LOWER CASE.
       UPPER CASE IS USED HERE ONLY FOR EASE OF VIEWING.
As in the above examples, you need to name the link using the NAME=".." added after the first anchor.

The following would create you named link:

<A NAME="TEXTLINK" HREF="NAMELINK.HTM">GO TO A PAGE THAT HAS A NAMED LINK </A>

In the above example the "TEXTLINK" is the name given to this section which we will want to come back to once we get to the new page. The "NAMELINK.HTM" is the name of the file we will be linking to.
This would create the link:

GO TO A PAGE THAT HAS A NAMED LINK

All this may see a bit confusing, but with a little practice you can jump to any location on your page and back again.

Try jumping to different parts of your page. Once you get that working, try jumping to another document like you did in step 13, but use the Target Name instead to get back.


In step 15 you will learn more about hyperlinks and see how to Link to other URL's on the web.

STEP 15 -- Links to Different Internet Sites



Basic Guide For Writing Web Pages -- Introduction / Table Of Contents / Previous Page / Next Page

created by Larry Curreri,

© 1996 l_curreri@yahoo.com
Visit My Home Page

last modified: January 14, 2002

This page hosted by Get your own Free Home Page

You are Here


=======THIS SECTION IS FOR TESTING THE LINK WITHIN A DOCUMENT=======
This is where the link takes you and where you would INSERT THE TARGET .

<A NAME="JUMP">YOU MADE IT TO THE TARGET POINT</A>

This would produces the Target point:

YOU MADE IT TO THE TARGET POINT

Entering the following creates a jump back.
Now <A HREF="#BACK">return to</A> previous section
Creates the following

Now return to previous section