As we discussed in Section 11.4.1, you can label a frame by adding the
name attribute to its
<frame> tag. Once
named, the frame may become the destination display window for a
hypertext-linked document selected within a document displayed in
some other frame. You accomplish this redirection by adding the
target attribute to the anchor that
references the document.
If you include a
target attribute within an
<a> tag, the browser loads and displays the
document named in the tag’s
attribute in a frame or window whose
the target. If the named frame or window doesn’t
exist, the browser opens a new window, gives it the specified label,
and loads the new document into that window. Once this process has
been completed, hypertext-linked documents can target the new window.
Targeted hypertext links make it easy to create effectivce navigational tools. A simple table of contents document, for example, might redirect documents into a separate window:
<h3>Table of Contents</h3> <ul> <li><a href="pref.html" target="view_window">Preface</a> <li><a href="chap1.html" target="view_window">Chapter 1</a> <li><a href="chap2.html" target="view_window">Chapter 2</a> <li><a href="chap3.html" target="view_window">Chapter 3</a> </ul>
The first time the user selects one of the table of contents hypertext links, the browser opens a new window, labels it “view_window,” and displays the desired document’s contents ...