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

Basic Web Page Writing Step 13
Linking To A Local File


In step 12 you saw the first sample of linking when you created the MAILTO link. You have been linking throughout this guide by jumping from one page to the next following these steps.


This step will give you some background information about linking and show you how to link between pages. You will also see how to link to a graphic image.

The main power of HTML comes from it's ability to link text and graphic images to another document or section of a document. A browser highlights the identified text or image with color and/or underlines it to show that it is a HYPERTEXT LINK or HyperLink.

What is a URL?

The World Wide Web uses an addressing system know as URLs which stands for Uniform Resource Locators, to indicate the location of items on the web. These hypertext links, the ones underlined in blue, are known as ANCHORS. Try clicking on the hyperlink above and see where you go.

Linking To Another File On Your Server
or in the same directory

NOTE: FILE NAMES SHOULD BE LOWER CASE.
       UPPER CASE IS USED HERE ONLY FOR EASE OF VIEWING.
To create a link to another file on your server you will use the ANCHOR tags <A> and </A>. You also will need to use the linking command HREF.

The example below will link you to a page called NewPage.htm, just like the example above.

<A HREF="NEWPAGE.HTM">GOING TO A NEW PAGE</A>

Notice the space between the <A and HREF, the use of the " (quote) symbol and also the > symbol after the file name.

This would produce the following link;

GOING TO A NEW PAGE

Click on the above and see where you go this time.

It is a good idea not to make web pages extremely long, so the use of the link option will allow you to create several pages and link them together.

Using an Anchor to Link To a Graphic

NOTE: FILE NAMES SHOULD BE LOWER CASE.
       UPPER CASE IS USED HERE ONLY FOR EASE OF VIEWING.
In step 11 you saw how to show in-line graphics that appear within your text. With the ANCHOR tag you can also create a link to display a graphic file which will display in a separate window displaying the image by itself on any empty page. It is useful when you have large images and don't want to make the user viewing your page wait a long time for a graphic image to load unless they really want to view it.

For this example we'll use the USFLAG.GIF that we used in past examples.

<A HREF="USFLAG.GIF">CLICK HERE TO SEE A FLAG OF THE UNITED STATES</A>

This would produce the following on your page:

CLICK HERE TO SEE A FLAG OF THE UNITED STATES

When you click on the above you are taken to a new page where the image of the USFLAG is displayed all by itself. Use the back button on your web browser to get back.

Create another web page using your template.htm you saved earlier. Then try linking between pages so you can jump from one to another. Remember the E-MAIL link in step 12 is another example of linking.


In step 14 you will learn more about hyperlinks and see how to Link to parts of your present document.

STEP 14 -- Links to Sections of Your Page



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: March 20, 1997

This page hosted by Get your own Free Home Page