HTML and CSS Reference
In-Depth Information
Links to Other Documents on the Web
So, now you have a whole set of pages on your local disk, all linked to each other. In
some places in your pages, however, you want to refer to a page somewhere else on the
Internet—for example, to The First Caesars page by Dr. Ellis Knox at Boise State
University for more information on the early Roman emperors. You also can use the link
tag to link those other pages on the Internet, which I'll call remote pages. Remote pages
are contained somewhere on the Web other than the system on which you're currently
working.
The HTML code you use to link pages on the Web looks exactly the same as the code
you use for links between local pages. You still use the <a> tag with an href attribute,
and you include some text to serve as the link on your web page. Rather than a filename
or a path in the href , however, you use the URL of that page on the Web, as Figure 6.5
shows.
FIGURE 6.5
Link to remote
files.
URL of remote file
<A HREF="http://www.cern.ch/">Cern Home Page</A>
Opening tag
Closing tag
â–¼
Task: Exercise 6.2: Linking Your Caesar Pages to the Web
Go back to those two pages you linked together earlier, 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
First Caesars page by Dr. Ellis Knox at Boise State University, whose URL is
http://www.boisestate.edu/courses/westciv/julio-cl/.
First, add the appropriate text for the link to your menu page, as follows:
<p><i> The First Caesars </i> page by Dr. Ellis Knox has more information on
these Emperors. </p>
What if you don't know the URL of the home page for The First 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 First
Caesars page looks like in a browser.
 
 
Search WWH ::




Custom Search