HTML code
<HTML>
<HEAD>
<TITLE>Writing Workshop II Home Page</TITLE>
</HEAD>
<BODY>
<CENTER>
<IMG SRC="illus1.gif" WIDTH=274 HEIGHT=205 BORDER=0
ALT="scriptor">
<H1>Writing Workshop II</H1>
Y20.7503.01/.04 / Spring 1996
<P>
<A HREF="mailto:anne.keating@nyu.edu"><B>Anne
B. Keating, Ph.D.</B></A><BR>
<I>Liberal Arts Degree Program - School of Continuing Education<BR>
New York University </I>
</CENTER>
<P>
<UL>
<LI><A HREF="course.htm">Course
Description</A>
<LI><A HREF="syllab.htm">Syllabus</A>
<LI><A HREF="hours.htm">Office
Hours</A>
</UL>
<P>
</BODY>
</HTML>
Step 6
Explanation: Navigational Links and E-mail Links
The chief power of HTML comes from its ability to link text
and images to other documents or sections of documents. A browser highlights the
identified text with color and underlines it to indicate that it is a "link."
Now it is time to add links to your page. HTML supports links to other files, to
subsections of other HTML files, to subsections of the same file, to URLs, and to an
e-mail address. To create links, you need to use the anchor tag: <A></A>.
The <A></A> tag can surround either text or an image and make
them linkable. It has several important attributes, including HREF, which specifies the
name of the file or location to which you are linking.
The value of HREF can be set to:
- A filename, if the file that you are linking to resides on the same
server, in the same directory. For example, in <A HREF="home.htm">
Return to Home Page </A>, the text "Return to Home Page" links to
a file called home.htm, which resides on the same server and in the same
directory as the page that contains the link. This is known as a relative link.
- A filename with its complete relative path, if the file you are
linking to resides on the same server but in a different directory. For example, in <A
HREF="resource/books.htm">Book List</A>, the text "Book
List" links to a file called books.htm located within a subdirectory called
"resource." In this example, <A
HREF="../home.htm">Return to Home Page</A> the text
"Return to Home Page" links to a file called home.htm located within a
directory one level above the page with the link. Both of these are also examples of
relative links.
- A complete URL, if the file you are linking to resides on another
server. The Web uses URLs to specify the location of files on other servers. A URL
includes the type of resource being accessed (e.g., Web, Gopher, WAIS), the address of the
server and the location of the file. The syntax is: scheme://host.domain[:port]/path/filename
where scheme is http:a-file-on-a-Web-server. For example, in <A
HREF="http://www.nyu.edu/classes/keating/welcome.html">Welcome to My Course
Web Site</A>, the text "Welcome to My Course Web Site" links to a
file called welcome.html located on an NYU Web server within the www.nyu.edu
domain.
- An e-mail address, or "mailto,"--if you
would like to allow people to send you e-mail from your Web page. In the example <A
HREF="mailto:anne.keating@nyu.edu">Send me an
E-mail</A> clicking on the text "Send me an E-mail" will launch
an e-mail client and fill in the "To:" field with the e-mail address anne.keating@nyu.edu.
- A subsection or anchor of the same file, if you would like to provide
links to other sections of your document. This is accomplished by using the NAME
attribute of the <A></A> tag. First, you need to insert an
anchor into your document at the point(s) that you want to link to. For example, if you
wanted a link at the bottom of your page that pointed back to the top of the page, you
would first insert the tag <A NAME="top"></A> at
the top of the page. (Note that there is no text contained within the opening and closing
tags. You do not need it because your are merely naming or bookmarking that spot within
your file.) Then go to the bottom of the page and insert the following tag: <A
HREF="#top">Return to Top</A>. (Note that internal anchors are
indicated by the # symbol, followed by the name of the anchor.) The text
"Return to Top" would link back to the top of the page, where you inserted the
"top" anchor.
As you can see in the HTML code above we have added some links to
our class page. We made the text "Anne B. Keating" an e-mail link, and the menu
choices (Course Description, Syllabus, and Office Hours) links to external files.