Using Links in HTML

Absolute Links
Local Links
Named Links
E-mail Links

Absolute Links
Without links - what would the Web be? "Link" is a shortened version of the term "hypertext link." In HTML we use hypertext links to connect pages. The tag for a link is:
<a href="http://www.sequoiahs.org/">
Sequoia High School</a> (Links are automatically underlined - so don't use an underline tag!!!)

The A in "a href" stands for Anchor. HREF stands for Hypertext REFerence. It is followed by an equal sign (=). The link above includes the full address (or path) to Sequoia's web page enclosed in quotation marks ("http://www.sequoiahs.org/"). This is known as an absolute link.
Top

Local or Relative Links
It is also possible to have links to pages that reside on your web site that do not include the full address. If you had a page called home.html and on that page you wanted to link to another page (on your site and in the same directory) called otherpage.html, you could use a local link:
<a href="otherpage.html">Other Page</a>
Top

Named Links on the Same Page
You can also link to different paragraphs on the same web page. This type of link requires that you create a name tag as well as a link. You place the name tag right above the paragraph that you want to link to. The form is:
<a name="top">

When you link to "top," you use the following tag:
<a href="#top">

The links at the top of this page are an example of links on the same page. Try clicking on the links to see where you go. Notice that the last link (E-mail Links) does not move the E-mail Links section to the top of the page. This is because it is at the end of the page. Usually, when you use links on the same page, you also use a link to the top of the page at the end of each section.Top

E-mail Links
To link to an e-mail address from your web page, you use a "mailto" command:
<a href="mailto:sgivens@seq.org">
Mrs. Givens</a>

District policy does not permit students to put their e-mail address, full name or any personal information on a web site that is posted on (or connected to a web page that is on) a district server.
Top

Back to the Week 3 Schedule