Without links,
the World Wide Web would be useless. After all, links are what makes the Web a
web. You can add links (or "hyperlinks", if you want to be formal
about it) that connect your page to any other pages or accessible sites on the
Net. Likewise, any other site can link back to you.
For this exercise, we will need
a second example page.
Open Windows Notepad and then open the example from the previous exercise. You
should have something like the example below.
<HTML>
<HEAD>
<TITLE>My Motor Parts Business</TITLE>
</HEAD>
<BODY>
<H1><FONT FACE="Arial">Welcome to My Motor Parts
Business</FONT></H1>
<H2>For all your automotive needs</H2>
<H3><FONT COLOR=#33DB99>This site is under
construction</FONT></H3>
</BODY>
</HTML>
Add a new line
under the <H3> line as follows...
<H4>This
is page 2</FONT></H4>
Your HTML
should end up looking like this...
<HTML>
<HEAD>
<TITLE>My Motor Parts Business</TITLE>
</HEAD>
<BODY>
<H1><FONT FACE="Arial">Welcome to My Motor Parts
Business</FONT></H1>
<H2>For all your automotive needs</H2>
<H3><FONT COLOR=#33DB99>This site is under
construction</FONT></H3>
<H4>This
is page 2</H4>
</BODY>
</HTML>
Now save the file, with a different name such as "page2.html" and then open up
your web browser and view the above file by using the 'File Open' option on your
browser. You should end up with something looking like this -
click
here.
Now open your
original example file, and add the following line under the <H3> line...
<A
HREF="page2.html">Go to Page 2</A>
Your HTML will
now look like this...
<HTML>
<HEAD>
<TITLE>My Motor Parts Business</TITLE>
</HEAD>
<BODY>
<H1><FONT FACE="Arial">Welcome to My Motor Parts
Business</FONT></H1>
<H2>For all your automotive needs</H2>
<H3><FONT COLOR=#33DB99>This site is under
construction</FONT></H3>
<A
HREF="page2.html">Go to Page 2</A>
</BODY>
</HTML>
Now save the
file, and then open up your web browser and view the above file by using the
'File Open' option on your browser. You should end up with something looking
like this -
click here.
When you click on the link, it
should take you to your second page.
If you need to create a link to
another website instead of another web page on your own website, then the link
would look like this...
<A
HREF="http://www.commrich.net">Go to CommRich Website</A>
Another type of link is the
send mail link or "mailto:". Type the following on a new line in your
HTML file...
<A
HREF="mailto:support@commrich.net">Click to send me
e-mail</A>
Now when you click on this
link, it will launch your default e-mail client and even fill in the
"To" box for you.
You can also use images as
buttons for your links, which I will be explaining in the "Images and
Backgrounds" section later on.
Go to Top