There are two kinds of links; links to other pages in your website, and links to other
websites. Both are relatively simple to learn about.
<A HREF="filename.html">Text with Name of Link Here</A> This is for linking
to other pages in your website. If the page you want to link to is in a different folder,
you must specify the folder. Go back to the "Images" tutorial and read up on how to
specify a file in a different folder; the principles are the same, except you're using
HTML files and not image files, and a different code. Also, be sure not to forget the
</A> tag at the end of the link name, or everything that comes after will be a link
to that page!
It's not much different for linking to someone else's webpage, only instead of just the
file name and maybe the folder, you have to type out the entire web address, starting
with http://. For instance, a link to my website would look like this:
<A HREF="http://TheRiverlands.tripod.com">Visit my webpage, The Riverlands!</A>
But in case you hadn't noticed, often on my webpages a picture, instead of a few words,
will serve as a link. It's not hard to do this, either. All you have to do is put the
code for the image in place of the text naming the link, like so:
<A HREF="http://www.webpage.com"><IMG SRC="imagename.ext"></A>
Now, the picture will have a colored border around it to show that it is a link. These
can be unattractive and often unnecessary. So, inside the image code, add BORDER=x,
<IMG SRC="imagename.ext" BORDER=x>
x stands for the number of pixels wide the border is. Substituting 0 for x will make the
Last of all, you may want to put a link on your webpage for viewers to email you. Just
<A HREF="mailto:firstname.lastname@example.org">Email me at email@example.com!</A>
However, not everyone will be able to use this email link, so it's a good idea to include
your actual email address in the name of the link, like I've done above. Like any other
link, you can attach an email link to an image.
By the way, in case you don't have an email address, you can sign up for one free
at http://www.hotmail.com. You'll need it to do
just about anything with your website, including for signing up with a website host.
You may notice that on some pages, like my Tolkien
website, clicking on a link will take you to someplace farther down on the same page. To use this
kind of link, you will first have to give names to the areas of the page you want to link to. You'd
do so like this:
<A NAME="NameHere">Text you want to jump to. Just a few words or a heading will do.</A>
The name can be anything at all, just as long as you'll remember it.
Then, when setting up the link to that section of the page, you would use this code:
<A HREF="#NameHere">Text of link goes here.</A>
If you want to link to a certain, named area of someone else's website, you would
type the code as follows:
It's pretty simple.
Now, just as a note; you can link to any kind of file, not just webpages. For instance,
making a link to an image file like I've shown below will allow your viewer to click on
the link and view the image by itself:
<A HREF="imagename.ext">View my website's logo!</A>
You could also do the same for music (MIDI) files and fonts. Examine the following:
<A HREF="music.midi">Listen to a song!</A> Clicking on a link like this
would take the reader to a page with just a song playing on it.
<A HREF="fontname.ttf">Download a font so you can view my webpage properly!</A>
Clicking on a link like this would allow your view to download a font. This could be
useful if you're using a certain font on your webpage and you want viewers to see it instead
of just seeing the default Times New Roman font.
Remember, however, that like any file, the files you link to must be uploaded to your
online account with your webpage host.