- Linking to Other Web Pages
- Linking Between Your Own Pages
- Relative Addresses
- Summary
- Q&A
- Workshop
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.
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/.