Make your own free website on

Lesson 7:Links


Links allow us to browse to another section of a web page, to view an in-line image, another page within a web site, or another web site in the Internet.

7.1 Text Link

The tags are

<a href="filename">text</a> for linking to a local file.
<a href="URL">Web site</a> for linking to another web site.

7.2 Graphical Link

The tags are just the same, but use an image in the place of text.

<a href="filename"><img src="image.jpg"></a>
<a href="URL"><img src="image.jpg"></a>

7.3 Email Link

This link allows users to email the person whose email address is specified in the link.
The tag is

<a href="">Email Me</a>

Now, copy and paste the codes below into your notepad and save the file as link.html.
<h1>This page contains various types of link</h1>
<body background="back.gif" link=blue alink=green vlink=red>
<a href="image1.gif">Click to view image</a>
<a href="graphic.html">Click to view this web page</a>
<a href="">Yahoo!, the search engine</a>
<a href="">Visual Basic Tutorial</a>
<a href="image3.jpg"><img src="image2.gif"><a>
<a href=""><img src="image1.gif"></a>
<a href="">Email Me</a>

Note: link=blue specified within the <body> tag means the link text will appear blue and vlink=red means the link text will appear red after a user has clicked on it(vlink actually means visited link). This is yet another parameter called alink which means active link that show the colour of the link text when a user is clicking on it.

Click here to view the sample output.


[Back to Main Page]