Lesson Five

Objectives:

  • Learn to make a hypertext link

Learning HTML


You are ready to take a big step! You are going to learn how to create links to other web pages. So far, everthing we've been doing has only involved one page--it's time to branch out.

The whole idea of the web is that it's linked together. You travel from page to page with the click of a mouse button. As you will see, the code for creating links is simple. The hard part is keeping it organized. You may design a website that has thousands of pages and hundreds of pictures. My website has a couple thousand pages in it, plus at least a thousand graphics. Add to that dozens of video clips and sound files--it becomes a management job to keep track of it all.

I recommend you keep notes on paper as you make a site so you don't have to rely on memory. Later you will be making folders for specific files. For now, just keep track of the names of your files.

To make a link, you need a place to link to--another web document. You can actually make a link from one part of a page to another part of the same page, but for now we are going to learn how to link to a different web page.

For our example, let's say we have two pages. The first will be named "one.htm" and the second, "two.htm." We are going to create a link on page one that will link to page two. The code is simple. It looks like this:

<a href="two.htm">Page two </a>

And this is what it looks like on your web page:

Page Two

You may be wondering what "a href" stands for: a hypertext reference. What you've created is a pushbutton type mechanism on the web page that has two parts: the link to the file you want to go to, and the word or words you want to serve as the link. Whatever you type in between the <a href="file_name.htm"> and the </a> is the link.


Now you're ready for your next assignment. Assignment #5.

<< Back