< A HREF = "URL" > link_word(s) </A>
Looking at the individual fields:
<A HREF="http://www.cs.uregina.ca/">
Click here for the CS Dept's Home Page.
< /A >
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 >
Here is a link with no link words, just a reference to a picture.
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.
HREF Tag for Links
The general format for the HREF tag is:
Let's look at an example.
This indicates that a link, or Anchor will be specified.
This URL is the address - relative or absolute - of the file referenced.
This denotes the end of the reference.
These words are what will appear coloured and underlined on the
Internet Explorer screen.
This terminates the HREF Anchor.
< 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.
<A HREF="http://www.cs.uregina.ca/~pvh/">
<IMG ALT="pvh Page" SRC="../../gifs/pvhome.gif"> </A>