|
Intro &
Getting Started | Viewing Source &
Tags | Making & Testing a Page
| Basic Text Formatting | Images
Links | Directory Structure & e-mail
| Tables | META
Tags | Outside Resources
Links:
Technically speaking, there are two types of links: one links to
something directly on the same page, the other links to a completely
different file (this file can be another HTML document in your site,
an image, a different website, etc.).
An "anchored link" is a link on a page that links to
elsewhere on the same page; this is commonly seen on FAQ pages where
the question links downwards on the same page to the answer. To
accomplish this, you'll first need to set an "anchor"
somewhere on a page. Find some kind of text towards the bottom of
your HTML document that you'd like to link to. Before that text,
enter the following:
<A NAME="myanchor">
The "NAME" attribute of the <A> tag indicates that
you're naming an anchor. Now, find some text near the beginning
of the page that you wish to have link DOWN to where the anchor
is. Your link should look something like this:
<A HREF="#myanchor">text that you wish to link
down to anchor</A>
The "A HREF" attribute of the <A> tag opens the
link, while the "#" tells the browser that the link is
somewhere on the same page. The </A> closes the link.
To link to a different web page in the same folder as your current
page, the link would look something like this:
<A HREF="otherpage.html">text that you wish to
link</A>
To link to a completely different website, such as Google, the
link would look something like this:
<A HREF="http://www.google.com">text that you wish
to link</A>. If the HREF attribute does not have "http,"
the browser will look for the page in your site.
>> next
|