[an error occurred while processing this directive]
|
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> 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> <a
href="subdir/section3.htm">Click here for the next
section</a> 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> 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> |