HREF Tag for Links

The general format for the HREF tag is:

< A HREF = "URL" > link_word(s) </A>

Looking at the individual fields:

Let's look at an example.

HREF's can be used in an unordered list or an ordered list. The next unordered list you see in this document is followed by the HTML code that produced the list. The code assumes that the documents page1.html, page2.html, page3.html, and page4.html all exist in the same location as the file containing the HREF tags. i.e. The HREF's are all relative references.

NOTE: These example links are just for fun. They are, however, examples of the type of relative references that you might include in your own index.html file.

Here is the code that produced that unordered list just shown.

< ul >
< li > < a href="page1.html" > Example Page 1 < /a >
< li > < a href="page2.html" > Example Page 2 < /a >
< li > < a href="page3.html" > Example Page 3 < /a >
< li > < a href="page4.html" > Example Page 4 < /a >
< /ul > As you look into the HTML language more, you will discover that HREF's can also contain links so that you can start up other applications from within Internet Explorer. e.g. FTP and mail (mailto: ... )

HREF's with IMG's

In many cases, a picture is used instead of words to show the link. To do this, you combine the HREF tag with the IMG tag.

Here is a link with no link words, just a reference to a picture.

pvh Page
This was created using the following HTML code.
<A HREF="http://www.cs.uregina.ca/~pvh/">
<IMG ALT="pvh Page" SRC="../../gifs/pvhome.gif"> </A>

The purpose of HREF's is to provide a means of navigating around the Internet. Be innovative in presenting methods of navigating. As just shown here, you can use a picture instead of words to provide a link to another area. Remember, once you get the document displayed on the screen, you can go to Internet Explorer's View menu and select Source, or right click on the frame or page, and select View Source. Examine how other people use HTML to present information. If you see a 'neat' method you can use it.