HTML and CSS Reference
In-Depth Information
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 displayinf prop-
erly, 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 con-
tained in the same folder or directory on your local disk (local pages). This section con-
tinues that thread, linking pages that are still on the local disk but might be contained in
different directories or folders on that disk.
NOTE
Folders and directories are the same thing, but they're called dif-
ferent 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.
6
When you specify just the filename of a linked file within quotation marks, as you did
earlier, the browser looks for that file in the same directory as the current file. This is
true even if both the current file and the file being linked to are on a server somewhere
else on the Internet; both files are contained in the same directory on that server. It is the
simplest form of a relative pathname.
Relative pathnames point to files based on their locations relative to the current file.
They can include directory names, or they can point to the path you would take to navi-
gate to that file if you started at the current directory or folder. A pathname might, for
 
 
Search WWH ::




Custom Search