Your website should potentially be a network of smaller sites linked together
through what's known as a Hypertext Link. If all of your information was
on one really long website it'd be harder to navigate, take longer to load,
etc. Basically, it would flunk the Compatibility test. So, break it up, mingle
a little, have some fun -- with links.
Creating Hypertext Links
To make a link, all you need to know is the document's address and how to
include an anchor in your HTML code.
URLs
Every single page on the internet, every single file, has its own unique
address, or URL. To link to something, you'll need to know the URL of the
file or page you're linking to.
<A> - The Anchor Tag
This tag is used to define both the source and destination of a link. Anything
that appears between the start anchor tag <A>, and the end anchor tag
</A> becomes activated by the browser, allowing the user to click on
that part of the document to take them somewhere else. Links are not limited
to just text -- you can also use graphics as links by placing the image between
the anchor tags in teh same way that you would plain text. (Note: most HTML
editors will do that for you, but again, it's important for you to know this.)
The attributes of the <A> tag are:
HREF
Target
HREF
This is that tag that tells the browser where to take you when you click
on it. Here's the code:
HREF="url"
In the place of "url", put the full URL, or if the page you're linking to
is in the same directory, you can simply put the file name. For example,
if you were linking to a page about your dog Sparky and that page were in
the same directory, just link to HREF="sparky.html"
TARGET
This tells the browser what window to open the link in. Sometimes this can
be handy, and sometimes it can get really annoying. We recommend you only
use it when linking to other peoples' pages, but not between the separate
pages of your own site.
TARGET=_blank
Next up: the exciting world of tables! |