Title-HTML.jpg
intro | tags | color | attributes | images | embedding | tables | links | | Exercises: 1.Homepage 2. Website
Need more help? Consult the w3schools.com tutorials

To turn a single webpage into a website, you've got to create MORE webpages, and link them together with "hyperlinks".

The <A HREF> TAG

<A> is the anchortag - on it's own, it does nothing... but use the HREF parameter and it creates HYPERLINKS
<A HREF="filename.htm"> will start making a link out of whatever follows it. </A> will close the hyperlink

"Go to the <A HREF="page2.htm">previous page</A>"
Would appear as
"Go to the previous page"

<A HREF="http:website address"> will send the link to another WEBSITE on the internet, ie:
//Go to <A HREF="http://google.com">Google!</A>//

Here are the initial rules:
  1. Use the tag <A HREF="filename.htm">LINK TEXT</A>
  2. Create a new HTML document which matches the designated "filename.htm" - SPELLING COUNTS!
  3. Create all your new htm documents in the same folder as your "index.htm" (index.htm will be your main "home" page)

LINK COLOURS

The default colour of your links is controlled by parameters placed in the BODY tag:
LINK="#FFFF00" would turn your "unvisited" links yellow
VLINK="#00FFFF" would turn your "visited" links aqua
ie:

//<BODY BGCOLOR="#000000" LINK="#FFFF00" VLINK="#00FFFF">//

ADDRESSING

To keep things simple you can link to files that are located in the same folder as your source code. If you wanted to link to files located in OTHER folders, you have to start building in an "address" to the target files.
ie.

./
looks in the local folder - it's the same as leaving the address blank
./foldername/
looks in a subfolder
../
looks in the parent folder
../../
looks in the parent to the parent folder
HTML_Addressing.gif
For example - assume we're in the INTERNET folder shown at left.
To link to the index.htm of the PAGES folder, we'd use the command:

//<A HREF="./pages/index.htm">Click Here</A>//
To link back again to the index.htm of the "Internet" folder, we'd use

//<A HREF="../index.htm">Click Here</A>//
Other tricks:
<A STYLE="text-decoration: none" HREF="filename.htm"> will keep the link from being underlined
(found by Carly Bauer 2008)//