Today's lesson tells you how to make a link from one document to another.
INDEX CARD #10:
INTRODUCTION TO LINKS (10a)
What is a LINK?
A link is a "pointer" that can transport users from one place to another place. This capability puts the "hyper" into hypertext! When you "click" on a link, you are "linked" to another location. (But don't worry... you can always use the "BACK" feature on your browser to take you back to where you came from...)
How do you know, when you look at a web document, where the links are? This depends on both the browser and the user's preferences. Usually, links are underlined, and in some noticeable color. In most browsers, you can
set your own preference for how
links are displayed: both links you have already visited, and ones that you haven't yet visited.
What's the most basic information required in a link? When you create a link, you'll want (at a minimum) to specify two things:
WHERE do you want users to go when they click on the link?
WHAT do you want the link to look like? That is, what string of
text, or image, will the user click on in order to be transported somewhere else? (I'll refer to this as the clickable area.)
A BASIC SAMPLE LINK (10b)
Suppose you have a file called "link_to_me.htm" that you want to create a link to. And, you want your web document to display "Please click here!" as the clickable area. Use the ANCHOR container tag "<A> ... </A>" with the HREF
attribute, like this:
<A HREF="link_to_me.htm"> Please click here! </A>
What's this "HREF=" stuff? "HREF" stands for "Hypertext
REFerence". (To "refer" means to direct to a source for help or
information. So... you're REFERRING the user to another source!) You put the address of where you want to go inside the quotation marks. This "address" is more precisely known as a URL (Uniform Resource Locator). More on URLs in a
Where does the stuff that I want to be the "clickable area" go? The
<A HREF="URL"> </A>
form a container, and the stuff that you want as your clickable area goes in between.
http://www.cwru.edu/help/introHTML/toc.html (link is no longer valid)
Please read Chapter 6 (ANCHORS) through the section on "HREF." (For today,
you'll be stopping at the "NAME" section. You'll finish the rest in the next day's lesson.)
(A10.1) Read pages 130134 (up to "Linking Within a Document") in the Weasel Book. Some of this will seem a bit heavy; just read it lightly so you know what's there. We'll be talking about lots of this stuff (URLs and such) in more detail in future lessons.
(A10.2) Choose your favorite browser, and figure out how to change the colors
of the VISITED and UNVISITED links.
(On Internet Explorer, try this: TOOLS--INTERNET OPTIONS--GENERAL--COLORS.)
(On Netscape Navigator, try this: EDIT--PREFERENCES--APPEARANCE--COLORS.)
(A10.3) Put a link on your homepage to another (appropriate) document!