Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Links to Other Documents on the Web 99

6


Exercise 6.2: Linking Your Caesar Pages to the Web ▼


Go back to those two pages you linked earlier today—the ones about the Caesars. The
menu.html file contains several links to other local pages that provide information about
12 Roman emperors.


Now suppose that you want to add a link to the bottom of the menu file to point to The
Twelve Caesars page on Wikipedia, whose URL is http://en.wikipedia.org/wiki/
The_Twelve_Caesars.


First, add the appropriate text for the link to your menu page, as follows:


The Twelve Caesars article in Wikipedia has more information on
these Emperors.


What if you don’t know the URL of the home page for The Twelve Caesars page (or the
page to which you want to link), but you do know how to get to it by following several
links on several different people’s home pages? Not a problem. Use your browser to
find the home page for the page to which you want to link. Figure 6.6 shows what The
Twelve Caesars page looks like in a browser.


You can find the URL of the page you’re currently viewing in your browser in the
address box at the top of the browser window. To find the URL for a page you want to
link to, use your browser to go to the page, copy the URL from the address field, and
paste it into the href attribute of the link tag. No typing!


FIGURE 6.6
The Twelve
Caesars page.


Free download pdf