|
Answer
by: Frederique Taillefer, Aplus.Net Knowledge Base Support.
A
HYPERLINK (or LINK for short) is a navigation tool you can build
into your page that enables your visitor to click on a word, phrase,
or image, and be taken to another location, also know as URL (Uniform
Resource Locator).
I. Creating
a hyperlink to another page on the Web:
Let’s
say for example that you are aware of a terrific online service that
enables you to store your photographs and you want to recommend it
to your site’s visitors. Here’s how:
- Start by writing the
text that will recommend the site to your visitors:
“You can easily create personal, online photo albums at
web-a-photo. It is easy to use and your friends, relatives, or associates
can readily access your photos.”
- Next, insert the proper
link tags to your HTML code:
“You can easily create personal, online photo albums at <a
href=http://www.web-a-photo.com</a> web-a-photo. It is easy to use and your friends, relatives, or
associates can readily access your photos.”
- Here’s how it will
look on your Web page:
“You can easily create personal, online photo albums at web-a-photo.
It is easy to use and your friends, relatives, or associates can
readily access your photos.”
II. Creating
a hyperlink to another page on your Website.
- Using an
absolute address:
A hyperlink that uses an absolute address contains an entire URL.
This is necessary if you are linking to a page that is not on your
Website, an can also be used to link between page of your Website.
Here’s an example of a hyperlink that uses an absolute address:
<a href=”http://www.web-a-photo.com/>web-a-photo</a>
- Using a relative
address:
A hyperlink that uses a relative address contains only the information
necessary for browsers to find the file you are linking to. This
can only be used when you are linking to another page in your own
site (i.e. the page is located on the same server).
Here’s an example of a hyperlink that uses a relative address:
<a href=”index.html”>Home</a>
or
<a href=”images/logo.jpg”></a>
III. Creating
an e-mail link:
You
can create a link that your Website’s visitors can click to
directly send you an e-mail without leaving your Website. Clicking
on that link will open up a new message in their default mail application
(the e-mail address will already be filled out) and allow them to
write you an e-mail. Here’s how:
- Type the following HTML
code:
<a href=mailto:user@yourdomain.com>user@yourdomain.com</a>
- Here’s how it will
look on your Web page:
user@yourdomain.com
IV. Creating
a link to another location on the same Webpage:
Sometimes,
especially when your Web page is long, or is divided into many sections
such as an FAQ page, you want your Website visitors to be able to
get to another location on your Webpage without having to scroll
all the way down. Let’s say for example that you want a link
at the top of your Webpage that takes your visitors to your contact
information lower down that page. Here’s how:
- At the top of your page,
where you want the link to be, type:
“Contact
information”
- Next, insert the proper
link tags to your HTML code:
<a href=”#contact”>Contact
information</a>
- Next, insert the following
link tags in your HTML code just above your contact information
at the bottom of your page:
<a name=”contact”></a>
- When your visitors click
on the “Contact information” link at the top of your
page, it will take them directly to the contact information section
of your page.
V. Creating
an image link to another page:
Sometimes
it is useful to have an image link to another webpage. Let’s
say for example that you have designed a logo, and that you want
a link from that logo to another Webpage which contains a description
of your company. Here’s how:
- In your HTML code, find
the code for the image source of your logo. Insert the following
link tags just before the image source tag (<img src=…):
<a href=”descriptionpage.html”><img src=”logo.jpg” width=”150” height=”120”></a>
- Clicking on your logo
should now take your visitors directly to your company description
page.
|