Web Page Design: Hypertext Links 02

The simplest type of hypertext link (just "link", from now on), is between two documents in the same directory (folder) on a computer. As an example, this file that you are reading is named "link02.html" in a directory and it has a link at the bottom to the next file in the course called "link03.html". When you activate the 'Next' button below, your browser will request the destination named in the link. The HTML element use to specify a link is A, called an anchor. The anchor element has an attribute called HREF which specifies the destination. The end tag is always required, and the material between the tags is called the label for the link. As you can see, we can put graphics, such as the next button image below, as a label - but we will restrict ourselves to text for now. The anchor is a character-level element, so you can place it anywhere you place text - in paragraphs, lists, headings, etc.

The markup for generating a link from this page to the next one (file "link03.html") with a text label "Go on to next page." looks like this:

<A HREF="link03.html">Go on to next page.</A>

and it will be rendered like this:

Go on to next page.

Go ahead and activate that link!


Go on to next segment Go to Contents