ptg16476052
Linking Local Pages Using Relative and Absolute Pathnames 95
6
make sure that you have quotation marks at the beginning and end of the filename (some-
times you can easily forget) and that both quotation marks are ordinary straight quotes.
All these things can confuse the browser and prevent it from finding the file or displaying
the link properly.
Now you can create a link from the caesar page back to the menu page. A paragraph at
the end of the claudius.html page is intended for just this purpose:
Go back to Main Menu
Add the link tag with the appropriate href to that line, such as the following in which
menu.html is the original menu file:
Nesting Tags Properly
When you include tags inside other tags, make sure that the closing tag closes the
tag that you most recently opened. That is, enter
<p> <a> .. </a> </p>
rather than
<p> <a> .. </p> </a>
Improper nesting of tags is invalid and could prevent your page from being displayed
properly, so always make sure that you close the most recently opened tag first.
Now when you reload the Claudius file, the link will be active, and you can jump
between the menu and the detail page by clicking on those links.
Linking Local Pages Using Relative and Absolute Pathnames
The example in the preceding section shows how to link together pages that are contained
in the same folder or directory on your local disk. This section continues that thread, link-
ing pages that are still on the local disk but might be contained in different directories or
folders on that disk.
▼
▲
Folders and directories are the same thing, but they’re called
different names depending on whether you’re on Macintosh,
Windows, or UNIX. I’ll simply call them directories from now on to
make your life easier.
NOTE