When you want to create "hot text" that someone can click on in a browser and cause a document to be accessed, you need to use an ANCHOR (abbreviated A) element. And you need to remember that Rule from the first part...If you open it...Close it!. An Anchor element is a marked text that is the start and/or destination of a hypertext link. Anchor elements are defined by the <A> and </A> elements. The <A> element accepts several attributes, but either the NAME or HREF attribute is required.
If the
HREF ATTRIBUTE is present, the text between the opening and closing anchor
elements becomes hypertext. If this hypertext is selected by readers, they are
moved to another document, or to a different location in the current document,
whose network address is defined by the value of the HREF attribute.
Example:
<A HREF="http://www.tucows.com/">Go
to TUCOWS</A>
In this example, selecting "Go to TUCOWS"
takes the reader to a document located at http://www.tucows.com which is not on
your site.
With the
HREF attribute, the form HREF="#identifier" can refer to another
anchor in the same document.
Example:
The <A HREF="document.html#glossary">glossary</A>
defines terms used in the document.
In this example, selecting "glossary" takes the reader to
another anchor in the same document (document.html). If the anchor is in
another document, the HREF attribute may be relative to the other document's
address.
If
present, the NAME attribute allows the anchor to be the target of a link. The
value of the NAME attribute is an identifier for the anchor. Note the NAME must
be exactly the same as it was in the original HREF ATTRIBUTE.
Example:
<A NAME="glossary">The definitions start here</A>
When
the NAME ATTRIBUTE is present, that's where the person would go to in your
document. .This allows the viewer to jump directly to that point without
scrolling down, particularly in a large document. To jump to a particular point
in a different document, as long as the NAME ATTRIBUTE is present, it can be
done by including the full path (entire URL) plus the NAME.
A working
example:
(try it then come back with the Browser's Back Button)
<A
HREF="http://www.firefighting.com/emtsue/index.html#map">Site Index Map and Text</A>
If you are
linking to another page in your own directory, you don't have to type the full
URL in. All you really need to type is the last part. For example, if your
document you want to link to is called page2.html, you would code it like this:
<A HREF="page2.html">Go to the Next Page</A>
If you are
linking to another site in Geocities, you don't need to type more than this:
<A HREF="/YourNeighborhood/1234">Check out this
site</A>
Note the presence of the / slash. This denotes the top
directory of your server, which in this case is Geocities. When you put a link
on your page to Geocities, such as in the required one, your coding just to go
to Geocities just merely needs to be a
<A HREF="/">Geocities
Free Home Pages</A>.
One of the
more common cries for help in the Geocities Help Forums is "How do I add an
image to make it a link?" It's very easy. Make sure you have the image
uploaded to your directory, and take careful note of the spelling, including
capitalization or not. Let's assume your picture that you're planning to use is
called "mypic.gif" and you want it to link to page2 of your site. Here
is the way you need to code it:
<A HREF="page2.html"><IMG
SRC="mypic.gif">Next Page</A>
This will put a
border around the picture identifying it to everyone as a "clickable link."
If you prefer not to have that border, you just add an ATTRIBUTE to the IMG SRC
(Image Source) Tag:
<A HREF="page2.html"><IMG
SRC="mypic.gif" BORDER="0">Go
to the next page</A>
Simple, huh? HTML, despite being
intimidating at first, is really a logical language.
MAILTO
If the person's browser supports it, this
will cause a mail window to pop up allowing the person to send mail directly to
you. The format will be:
<A HREF="mailto:yourname@anyplace.com">E-Mail
Me</A>
Don't forget to replace the yourname@anyplacecom with your
actual email address.
FTP Sites
The syntax for this is similar, but you
will not be using the http part. Code it like this:
<A
HREF="ftp://ftp.uci.edu/med-ed/>FTP Site</A>
-OR-
<A
HREF="ftp://www.techknow.com/emscom">FTP Site</A>
Just be
sure to replace the names with yours. It may even start with www.
Gopher Sites
Again, you will be replacing the http
with this:
<A HREF="gopher://atlas.chem.utah.edu/11/MSDS">Gopher
Site</A>
Remember to replace with yours.
Telnet Sites
If you want to allow a connection to a
Telnet site, here is the coding:
<A HREF="telnet://telnet.mediccom.org/">Telnet
to this site</A>
Again replace it with the proper name.
News Groups
Be careful when you connect to a
newsgroup. The person attempting to access it may not have the group offered by
their ISP (Internet Service Provider).
<A HREF="news:misc.emerg-services">Misc
Emergency Services</A>
Note that this is similar to the mailto
in that you're not using the double slashes (//).
NewsSource
Rarely used, but this will connect to a
specific file in a newsource.
<A HREF="newsrc:....">Read
this</A>
Again, rarely used.
News Server
This is used to connect to a different
news server than the person viewing the page might not have
<A HREF="nntp://news.microsoft.com">Connect to
Microsoft News</A>
Yeah, right, we really want to connect to
Microsoft. :-)
| Page 1 | Page 2 | Page 3 | Page 4 |
| The Basics | Basics Page 2 | Basics Part 3 | Basics Part 4 | Color Chart | Color Tester | Downloads | Geocities FAQ's | Font Viewer | Graphics Help | Gif Wizard | Helpful Links | Midi Tips and Tricks | Page Builder | Good Page Design Tips | Intro Page |Simple Frames | Tables |