Beginning:
Adding a Link
If you
have built your site with SiteBuilder, or are not very experienced
with building web pages, you may not know how to add a link
to another page or site.
The
links are made by using the using the <A>
tag. (A tag is a special code that you put in your page
that tells the browser to do something.)
The
<A>
tag has two parts: the opening tag and the closing tag.
There is also text (or an image) that go in between the
opening and closing tags.
Let's
take a look at a simple example:
If
you are using SiteBuilder, go to the SiteBuilder and edit
the page you want to have bold text. Find the section you
want to include the text in, and click on the edit button
for that section.
If you
are not using SiteBuilder, use a text editor program (like
Notepad) to open your file, and find the place you want
to put the link.
To make
a link to the Freeservers home page, the first thing you
would need to do is create the opening tag. It should look
like this:
<A
HREF="http://www.freeservers.com">
You
will notice that there is something other than just "A"
inside the tag. HREF= tells your browser where the link
should point to.
Now,
type the text that you want to appear where the link is:
This
is a link to Freeservers!
Finally,
you need to tell the browser where the link ends by putting
in the closing tag:
</A>
Put
it all together and it should look like this:
<A
HREF="http://www.freeservers.com"> This
is a link to Freeservers!</A>
Make
sure you save the changes you make. If you preview the page,
you will see that the text within the <A>
tag is is underlined (and may be a different color) like
this:
This
is a link to Freeservers!
So
go ahead and try these techniques to add some links to other
websites.
Now,
what if you want to link to a page within your own website?
It's exactly the same, except that instead of putting in
http:// followed by a domain name, you only put in the page
you want to link to.
For
example, if you wanted to link to a page called photos.html
in the same directory (folder) as the page you are linking
from, you would have the following in your opening <A>
tag:
<A
HREF="photos.html">
It
gets a little more complicated if the page is in a subdirectory.
For instance, if you have a page called abba.html
in a subdirectory called music, you would have the
following in your opening <A>
tag:
<A
HREF="music/abba.html">
What
if you want to link back from the abba.html page
to a file outside the music subdirectory? You can
use the a special code to mean "go up one directory
level". The code is ../ (two periods and a slash).
So to link to a file called sweden.html in the directoty
above, you would have the following in your opening <A>
tag:
<A
HREF="../sweden.html">
So
there you have the basics of linking to other pages and
sites from your website. Good luck in building your site!
|