'); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' Quick Quiz Results
'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' Quick Quiz Results'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln(' Each question of the quick quiz will be restated below, along with the correct answer. If the the red light is on, you answered the question incorrectly. If it is green, you answered correctly.'); results.document.writeln('

'); results.document.writeln('


'); results.document.writeln('

'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' Question 1'); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln('

'); results.document.writeln(' '+form.Q1.value); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '+form.A1.value); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln('


'); results.document.writeln('

'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' Question 2'); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln('

'); results.document.writeln(' '+form.Q2.value); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '+form.A2.value); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln('


'); results.document.writeln('

'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' Question 3'); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln('

'); results.document.writeln(' '+form.Q3.value); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '+form.A3.value); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln('


'); results.document.writeln('

'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' Question 4'); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln('

'); results.document.writeln(' '+form.Q4.value); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '+form.A4.value); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln('


'); results.document.writeln('

'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' Question 5'); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln('

'); results.document.writeln(' '+form.Q5.value); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '+form.A5.value); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln('


'); results.document.writeln('

'); results.document.writeln(' Click the close button below to close this results window. Then click Next Chapter to advance to the next chapter.'); results.document.writeln(' '); results.document.writeln('

'); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(' Close
'); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln('
'); results.document.writeln(' '); results.document.writeln(''); results.document.close(); } // end hide from crusty browsers -->
Tutorial Navigation Bar Home New Users Returning Users Tutorial Features Site Map
Chapter 4: Links
Goals of this Chapter

After completing this chapter you should be able to insert various kinds of hyperlinks into your page.


Chapter Sections

The sections of Chapter Four are as follows:

Section 4.1: What Are Links?
Links make the HTML language different from any other kind of document. Links allow the site user to get from one place to another on the web. Using links in your page will allow you to direct users from one page to another.
Section 4.2: Types of Links
There are two main types of links, text links and graphical links. Text links consist of a word or phrase that, when clicked on, takes the user to a different page or web site. Graphical links do the same when a user clicks on the selected image.
Section 4.3: The <A> Tag
The <A> tag is used to signify and define links. The following code is an example of a local link.

<A HREF="Page.html">
	Link...
</A>

Looking at the code above, you should notice the attribute HREF. This attribute tells the browser where to take the user when the link is clicked on, in this case, Page.html. The result of the above code follows.

Link...

Please consider the following code, which demonstrates a graphical link.

<A HREF="Page.html">
	<IMG SRC="images/Button.gif">
</A>

This is how the actual link will look.

To get rid of the border around the image, just add BORDER=0 in the <IMG> tag. This attribute will turn off the border.

If you want to link to a page somewhere else on the Internet, use the following format.

Netscape Site

Section 4.4: Anchors
Anchors allow your links to be even more specific in terms of their location. Anchors allow the user to jump to a specific spot in a web page. The following code should be inserted wherever you wish to directly jump.

<A NAME="Link"></A>

Place the following code in the spot that you want the link to be.

<A HREF="#Link">
	Link...
</A>

If you are linking to a specific spot on another page, use this code.

<A HREF="Page.html#Link">
	Link...
</A>

Please note that the word Link in the example can be substituted with any other word, as long as the same word is used consistently.

Section 4.5: Quick Quiz
Try to answer the following questions without looking back at the chapter.


Question 1: What are the two main types of links?

Graphical and anchor.
Anchor and text.
Graphical and text.


Question 2: When using a graphical link, what is added to remove the border?

The NOBORDER flag.
The IMGBORDER=0 attribute.
The BORDER=0 attribute.


Question 3: Why is an anchor used?

To link to a specific page.
To link to a specific area on a page.
To display an image as a link.


Question 4: What tag is used to insert a link?

The <ANCHOR> tag.
The <LINK> tag.
The <A> tag.


Question 5: Which piece of code is correct?

<A LINK="Page.html">
<A LINK="Page">
<A HREF="Page.html">


Now that you have completed the Quick Quiz, please press the Submit button to see your results. If you would like to restart the Quick Quiz, press the Clear button. If nothing happens when the Submit button is pressed, your browser does not support JavaScript. In this case, you should click here for the answers.

Continue the Tutorial
Please click the Next Chapter button below to advance to the next chapter.
Next Chapter