Sams Teach Yourself HTML 4 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Put Your HTML Page Online Today
- I. Your First Web Page
- Hour 1. Understanding HTML and XML
- Hour 2. Create a Web Page Right Now
- Hour 3. Linking to Other Web Pages
- Linking to Another Web Page
- Linking Between Your Own Pages
- Relative Addresses
- Summary
- Q&A
- Workshop
- Hour 4. Publishing Your HTML Pages
- II. Web Page Text
- Hour 5. Text Alignment and Lists
- Hour 6. Text Formatting and Font Control
- Hour 7. Email Links and Links Within a Page
- Hour 8. Creating HTML Forms
- III. Web Page Graphics
- Hour 9. Creating Your Own Web Page Graphics
- Hour 10. Putting Graphics on a Web Page
- Hour 11. Custom Backgrounds and Colors
- Hour 12. Creating Animated Graphics
- IV. Web Page Design
- Hour 13. Page Design and Layout
- Hour 14. Graphical Links and Imagemaps
- Hour 15. Advanced Layout with Tables
- Hour 16. Using Style Sheets
- V. Dynamic Web Pages
- Hour 17. Embedding Multimedia in Web Pages
- Hour 18. Interactive Pages with Applets and ActiveX
- Hour 19. Web Page Scripting for Non-Programmers
- Hour 20. Setting Pages in Motion with Dynamic HTML
- VI. Building a Web Site
- Hour 21. Multipage Layout with Frames
- Hour 22. Organizing and Managing a Web Site
- Hour 23. Helping People Find Your Web Pages
- Hour 24. Planning for the Future of HTML
- VII. Appendixes
- A. Readers' Most Frequently Asked Questions
- B. HTML Learning Resources on the Internet
- C. Complete HTML 4 Quick Reference
- D. HTML Character Entities
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 on this page is a link back to the page shown in Figure 3.6.
Using filenames instead of complete Internet addresses saves you a lot of typing. 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, or to a CD-ROM or DVD disk, and all the links will still work correctly.
Relative Addresses | Next Section

Account Sign In
View your cart