HTML and CSS Reference
In-Depth Information
Make sure that both of your files are in the same directory or
folder. If you haven't called them menu.html and claudius.html ,
make sure that you take note of the names because you'll need
them later.
Create a link from the menu file to the feeding file. Edit the menu.html file, and put the
cursor at the following line:
< li >Claudius< /li >
Link tags don't define the format of the text itself, so leave in the list item tags and just
add the link inside the item. First, put in the link tags (the <a> and </a> tags) around the
text that you want to use as the link:
<li><a> Claudius </a></li>
Now add the name of the file that you want to link to as the href part of the opening link
tag. Enclose the name of the file in quotation marks (straight quotes [“], not curly or
typesetter's quotes [“]), with an equal sign between href and the name. Filenames in
links are case-sensitive, so make sure that the filename in the link is identical to the name
of the file you created. ( Claudius.html is not the same file as claudius.html ; it has to
be exactly the same case.) Here I've used claudius.html ; if you used different files, use
those filenames.
<li><a href=”claudius.html”> Claudius </a></li>
Now, start your browser, select Open File (or its equivalent in your browser), and open
the menu.html file. The paragraph you used as your link should now show up as a link
that is in a different color, underlined, or otherwise highlighted. Figure 6.3 shows how it
looked when I opened it.
Now, when you click the link, your browser should load and display the claudius.html
page, as shown in Figure 6.4.
Search WWH ::

Custom Search