| One of the most important aspects of the Internet, and creating sites, is linking sites to eachother. This tutorial was made to explain just how do that, using images and text, it will show how to link to other sites and within a page. |
| Tags Needed | |
| Tag | Explanation |
| <A> </A> | This tag is used to start a link. |
| <IMG> </IMG> | This tag is used to insert images on your page. |
|
First off, you need to know what makes up a link, so look at this diagram:
Now that you understand what a link looks like we can show you a few in action.
Text Link
<A HREF="http://www.yahoo.com>Yahoo!</A>
Above we have what is called an absolute URL. You use this type of URL when you are linking to a completly different web site. The other type of URL is called the relative URL. You use this when you are linking to a different page, but one that is within your site. They look like this:
<A HREF="index.html">Script Source</A> When the browser sees a URL like the one above it will look at the domain that it is curently at, and find the specified file, in this case index.html, then it will take visitors there.
Link Within A Page <A HREF="#top">Top</A> You can change "Top" to whatever you want. This goes where the link will take your visitor: <A NAME="top"> The area of the page that you placed the final part of the link at will be at the very top of the page. You should place this part of the code right next to what you to be displayed at the top of the browser when the link is clicked. In this example we want the heading of our page to be at the top, so we placed the tag right before it.
E-mail Link
<A HREF="mailto:pr0teus@juno.com">PR0TEUS@juno.com</a> The mailto: is what makes this link different than the others. This is all you have to do to make one of these links.
Linking With Images
<A HREF="index.html"><IMG SRC="logo1.gif"></A> When you use an image as a link there will be a border around the image. The border's color depends on the colors that you chose for LINK, ALINK, and VLINK, as well as if the user has visited that page yet. You can change the border size to whatever you'd like by adding BORDER=X.
<A HREF="index.html"><IMG SRC="logo1.gif" BORDER=10></A> If you set the border to 0 then there will be no border. |