 |
Creating Links |
Links allow you to skip from one page to another, watch
movies, or listen to music. A link has three parts:
-
destination -- used to
specify what will happen when the visitor clicks the link.
-
label -- part the visitor sees and clicks on
the reach the destination.
-
target -- determines where the destination
will be displayed.
(often left up to the browser, but can be a
particular window or frame, or a new window or frame.
What we'll be learning:
-
How to create a link to another Web page
using HTTP
-
How to create an Anchor
-
How to link to email
Let's Get Started!
How to create a link to another Web page using HTTP:
Once you learn this format, you can make as many links as you want
to any other page you want.
To begin:
Type <A HREF="URL.html">Type here the name
of the page you are linking</A>
Here are two examples:
-
<A HREF="http://teachertech.rice.edu/Participants/sboone/Lessons/Titles/lphouse.html">A
FUNCTIONAL HOUSING MARKET</A>
This is what will appear on the page if you use the command above....Note
that this page "lives" at another site (the URL is different than the one
on this page). Note: The anchor name could stop at Lessons/.
This is a directory. The trailing forward slash tells the browser
to search for the default file, usually called index.html, in the
last directory mentioned. (This was the reason Michael and I suggested
NOT calling your practice homepage index.html....it is a very powerful
file.
A
FUNCTIONAL HOUSING MARKET
The Titles directory does not have an index.html file. The
link below will show you what will happen if the URL ends at a directory.
A
List of File Names in the "Titles" Directory
-
<A HREF="hello.html"> HELLO!
</A>
This is what will appear on the page if you use the command above...Note
that this page "lives" in the same directory as the file you are reading.
(the URL starts out exactly the same. The only difference in location
is the file name.)
HELLO!
Back to Top
Creating Anchors:
Normally, a click on a link brings the user to the topof
the appropriate Web page. If you want to have the user jump to a specific
section of the Web page, you have to create an anchor.
To create an anchor:
-
Place the cursor in the part of the Web page that you wish the user to
jump to.
-
Now Type <A NAME="anchor name">anchor
name is the text you will use internally to identify that section of
the webpage words you wish to be referenced
-
Add the words or images that you wish to be referenced.
-
Type </A> to complete the definition of
the anchor.
Once you have created an anchor you can define a
link so that a user's clikc will bring them directly to the section of
the document that contains the anchor, not just the top of that document.
Linking to a specific anchor
-
Type <A HREF="#
-
Type anchor name, where anchor name is the NAME of the destination
section (step 2 above).
-
Type ">
-
Type the label text, that is, the text that will be underlined or highlighted
in blue, and that when clicked upon will take the user to the section referenced
in step 2.
-
Type </A>to complete the definition of
the link.
"Note there are "anchors" at the top of this page
that take you to each of the three sections"
Back to Top
How to link to email:
Allowing people to write to you from your page is quite simple.
Use the following formula:
<A HREF="mailto:your login@cs.rice.edu">Send
me comments</A>
What this does is place the blue wording on the screen so people can
click on it to send you a piece of email. It is always a good idea
to show your e-mail address also. Some people do not have the ability
to send mail from their browser. Avoid the tempatation to have just
an image of a letter, or just text to send comments with the mailto link
pointing to it.
Send me comments:sboone@cs.rice.edu
Back to Top
Use HTML
4 For the World Wide Web by Elizabeth Castro as
a reference for the lesson
Last edited June 16, 2000
Back to Tuesday's Lesson
URL: http://teachertech.rice.edu/Materials/GT2000/Mac/day02/link.html
These pages were developed through GirlTECH
,
a teacher-training program sponsored by the Center
for Excellence in Education (CEEE) and made possible by support from
the National Science Foundation through
EOT-PACI.
Copyright © Susan Boone, June 2000.