ptg16476052
Creating Links 91
▼ 6
Text that will be highlighted
File to load
when link is selected
Opening tag Closing tag
The following example shows a simple link and what it looks like (see Figu re 6.2) :
Input ▼
Go back to Main Menu
Output ▼
Exercise 6.1: Linking Two Pages
Now you can try a simple example with two HTML pages on your local disk. You’ll
need your text editor and your web browser for this exercise. Because both the pages
you’ll work with are on your local disk, you don’t need to be connected to the Internet.
(Be patient; you’ll get to do network stuff in the next section.)
Create two HTML pages and save them in separate files. Here’s the code for the two
HTML files I created for this section, which I called menu.html and claudius.html. What
your two pages look like or what they’re called really doesn’t matter. However, make sure
that you insert your own filenames if you’re following along with this example.
FIGURE 6.1
A link on a web
page.
FIGURE 6.2
How a browser dis-
plays a link.
▼