HTML and CSS Reference
In-Depth Information
FIGURE 6.1
A link on a web
page.
File to load
when link is selected
Text that will be highlighted
<A HREF="../menu.html">Go back to Main Menu</A>
Opening tag
Closing tag
The following example shows a simple link and what it looks like (see Figure 6.2):
Input
Go back to <a href=”menu.html”> Main Menu </a>
.
Output
FIGURE 6.2
How a browser dis-
plays a link.
Task: Exercise 6.1: Linking Two Pages
Now you can try a simple example with two HTML pages on your local disk. You need
your text editor and your web browser for this exercise. Because both the pages you work
with are on your local disk, you don't need to connect to the Internet. (Be patient; you'll
get to do network stuff in the next section.)
6
Create two HTML pages and save them in separate files. Here's the code for the two
HTML files for this section, called menu.html and claudius.html . What your two pages
look like or what they're called doesn't matter. However, make sure that you insert your
own filenames if you follow along with this example.
The following is the first file, called menu.html :
<!DOCTYPE html><html>
<head>
 
 
Search WWH ::




Custom Search