HTML and CSS Reference
In-Depth Information
In this exercise, you create four separate HTML documents that use hyperlinks, includ-
ing the target attribute. You use these hyperlinks to open two new windows called
yellow_page and blue_page , as shown in Figure 17.2. The top window is the original
web browser window (the red page), yellow_page is at the bottom left, and blue_page is
at the bottom right.
FIGURE 17.2
Using the
target attribute
indicates that
links should open
new windows.
First, create the document to be displayed by the main web browser window, shown in
Figure 17.3, by opening your text editor of choice and entering the following lines of
code:
Input
<!DOCTYPE html>
<html>
<head>
<title> Parent Window - Red </title>
<style type=”text/css” media=”screen”>
body {
background-color: #ff9999;
}
</style>
</head>
<body>
<h1> Parent Window - Red </h1>
<p><a href=”yellow.html” target=”yellow_page”> Open </a> the Yellow Page in a
new window. </p>
 
 
Search WWH ::




Custom Search