The Link Tag

| Another Page | Another Place | Same Document | MailTo |

The HTML link tag <A>...</A> is often called an anchor tag. It creates anchors for links within a page, links to other pages or links to other locations on the Internet. Unlike some tags the <A> tag has other parts to it called attributes.

Within the <A> tag you will see NAME, HREF and TITLE. HREF is probably the one you will use most often. It means Hypertext REFerence. It names the file or the URL where this link will point.

Like most HTML tags, the link tag also has a closing tag, </A>.

Linking to Another Page

Here is an HTML link tag that will take you back to the agenda page for tonight's class.

<A HREF="april10.html">Return to the April 10 page.</A>

"Return to the April 10 page." is between the opening tag and the closing tag and is the text that will be highlighted or underlined. Selecting that text will take you to the place specified by the HREF attribute.

The output in Netscape looks like this:

Return to the April 10 page.

Linking to Another Place on the Internet

Here is an HTML link tag that will take you to the CNN News Web site.

<A HREF="http://www.cnn.com">CNN News</A>

The output in Netscape looks like this:

CNN News

Be sure to select the BACK button on your browser to return to this page.

Linking to Anchors in the Same Document

Select this link to take you to the top of this page. At the top of the page you will see three links that take you to places within this document.

The form for an anchor tag that repositions the browser to another place within the same document looks like this:

<A HREF="#top">top of this page</A>

The label at the top of the page that is the destination looks like this:

<A NAME="top">link tag</A>

See where this link takes you. What are those Definition List tags???

A Mailto Link

If your browser supports Mailto URLs then selecting a mailto link will bring a mail composition window that will prompt you for a subject and the body of a message. The "To:" field will already be filled.

pweeg@shore.intercom.net

This is the tag that created the mailto link above.

<A HREF="mailto:pweeg@shore.intercom.net">pweeg@shore.intercom.net</A>

Search The Global Classroom
Patricia A. Weeg
pweeg@shore.intercom.net
Return to Global Classroom