Home > Articles

  • Print
  • + Share This

Linking Between Your Own Pages

When you create a link from one page to another page on the same computer, it isn't necessary to specify a complete Internet address. If the two pages are in the same directory folder, you can simply use the name of the HTML file:

<a href="pagetwo.htm">click here to go to page 2.</a>

As an example, Figures 3.4 and 3.6 show a quiz page with a link to the answers page in Figures 3.5 and 3.7. The answers page contains a link back to the quiz page.

Figure 3.4
Because this page links to another page in the same directory, the filename can be used in place of a complete address.

Figure 3.5
This is the answers.htm file.Figure 3.4 is quizzer.htm, to which this page links back.

Figure 3.6
This is the quizzer.htm file listed in Figure 3.4 and referred to by the link in Figure 3.5.

Figure 3.7
Click here for answers in Figure 3.6 takes you here. Click here for the questions takes you back to Figure 3.6.

Using filenames instead of complete Internet addresses saves you a lot of typing when it is possible to place all files in the same directory. More importantly, the links between your pages will work properly no matter where the pages are located. You can test the links while the files are still on your computer's hard drive. You can then move them to a computer on the Internet, a CD-ROM, or a DVD, and all the links will still work correctly.

Note - At the 24-Hour HTML Café, you'll find some fun sample pages demonstrating hypertext links, including a tour of Indigestible Ingestibles Research sites on the Internet and a light-hearted literary history quiz. These intriguing pages can be found, along with the other examples from this hour, at http://24hourhtmlcafe.com/hour3/.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.