Become a "Friend of BCN"

BCN Logo Boulder Community Network
HTML Class: Links

Linking

Linking is the "hyper" in HTML. To link you use anchor tags <a > . . .</a>
Anchor tags must have attributes.

You can link to a place within the same document--a two-part process.

<a name="top">Level 1 Head</a> (anchor)
<a href="#top">Go to Top of Page</a>
or <a href="mypage.htm#top">Go to Top of Page</a> (link)

HREF stands for Hypertext REFerence.

Exercise 5

create an anchor (name) tag at the top of your page, type Go to Top of Page at the bottom of your Web page, and create a link back to the top..

answer

To other documents

<a href="filename.htm">Filename</a> (relative link)
<a href="mainfolder/myfolder/filename.htm">Filename</a> (absolute link)
This example shows pathnames, which we don't really cover in this class.

To a specific place in another document

<a href="filename.htm#top">Go to Top of Page</a>

Note the pound sign before the filename.

To other Web sites (URLs [Uniform Resource Locators])

<a href="http://bcn.boulder.co.us">Boulder Community Network</a>

Note that you must include the http:// part. If you forget it, the link won't work properly.

Exercise 6

type Boulder Community Network onto their Web page and create a link to it

answer

To an email address

<a href="mailto:">Pierre Malraison</a>

Exercise 7

type your name and email address (or someone else's) onto your Web page and create a "mailto:" link to it.

answer

Next

Boulder Community Network


Copyright © Pierre Malraison All rights reserved.