[an error occurred while processing this directive]

Site Menu

HTML
Learn all about HTML, how to format text, add images, create tables, meta taga, and more!
.
JavaScript
Get the low down on JavaScript. See how to create popular JavaScript applications like drop down menus, clocks, dynamic messages, popup boxes, and more.
.
CGI
Concise, easy to follow introdction to CGI and how to install CGI scripts.
.
Web Design
A miscellanous section that includes various web design tutorials

 

123 Web Design!

Adding links

What would the WWW be without links? Links represent the essence of the WWW, linking millions and millions of pages from around the world together...what are we waiting for? Lets start linking!

Links are created using the <a> tag. The <a> tag requires a href attribute which specifies the target URL it should follow when the link is clicked on. Here is a text link that goes to Yahoo:

<a  href="http://www.yahoo.com">Click here for Yahoo</a>
Click here for Yahoo

The above link links to an external document on the WWW. You can easily create links that link to a local document within your site. Just supply the complete path of the target document, with the current document the starting point. Here's are some examples:

<a  href="section3.htm">Click here for the next section</a>
Click here for the next section

<a  href="subdir/section3.htm">Click here for the next section</a>
Click here for the next section

The first link assumes that section3.htm is in the same directory as the current page, whereas the second assumes section3.htm is stored in the directory "subdir", a sub directory of the current directory.

-Adding Image links

Once you understand how to create links in general, creating image links are a snap. Just substitute the text with the <img> tag. Why don't we let our paper boy take us to Yahoo when clicked on?

<a href="http://www.yahoo.com"<img src="paperboy.gif"></a>
PE03257A.gif (4096 bytes)

Notice the blue line surrounding the image- this is how an image link appears by default. We can easily get rid of the border by setting the border attribute to 0:

<a href="http://www.yahoo.com"<img src="paperboy.gif" border=0></a>
PE03257A.gif (4096 bytes)