ptg16476052
558 LESSON 20: Working with Frames and Linked Windows
▼
target Name Description
target="_top" Forces the link to load into the full web browser window, replacing the
current page entirely. If the current document is already at the top,
however, target="_self" will be used. More often than not, when
you create links to other sites on the Web, you don’t want them to
open within a frame. Adding target="_top" to the link will prevent
this from occurring.
Exercise 20.1: Working with Windows
Each of the hyperlinks in the following exercise uses the target attribute to open a web
page in a different browser window. The concepts you’ll learn here will help you under-
stand later how targeted hyperlinks work with frames.
In this exercise, you create four separate HTML documents that use hyperlinks, including
the target attribute. You use these hyperlinks to open two new windows, called
yellow_page and blue_page, as shown in Figure 20.1. The top window is the original
web browser window (the red page), yellow_page is at the bottom right, and blue_page
is at the bottom left.
FIGURE 20.1
Using the target
attribute indicates
that links should
open new windows.
▼