11.7.1. The target Attribute for the <a> Tag
If you include a target attribute within an <a> tag, the browser will load and display the document named in the tag's href attribute in a frame or window whose name matches the target. If the named or id'd frame or window doesn't exist, the browser will open a new window, give it the specified label, and load the new document into that window. Thereafter, hypertext-linked documents can target the new window.
Targeted hypertext links make it easy to create effective
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 will open a new window, label it
"view_window," and display the desired document's
contents inside it. If the user selects another link from the table
of contents and the "view_window" is still open, the
browser will again load the selected document into that window,
replacing the previous document.
Throughout the whole process, the window containing the table of
contents is accessible to the user. By clicking on a link in one
window, the user causes the contents of the other window to change.
Rather than open an entirely new browser window, a more common use of
target is to direct hyperlink contents to one or
more frames in a <frameset> display. You
might place the table of contents into one frame of a two-frame
document and use the adjacent frame for display of the selected
documents:
<frameset cols="150,*">
<frame src="toc.html">
<frame src="pref.html" id="view_frame">
</frameset>