start page | rating of books | rating of authors | reviews | copyrights

HTML: The Definitive Guide

Previous Chapter 15
Tips, Tricks, and Hacks
Next
 

15.6 Creating New Windows

For the vast majority of links in your documents, you'll want the newly loaded document displayed in the same window, replacing the previous one. That makes sense, since your users usually follow a sequential path through your collection.

But sometimes it makes sense to open a document in a new window, so that the new document and the old document are both directly accessible on the user's screen. If the new document is related to the original, for instance, it makes sense to have both in view. More commonly, the new document starts the user down a new web of documents, and you want them to see and remember where they came from.

Regardless of the reason, it is easy to open a new browser window from your HTML document. All you need to do is add the target attribute in the appropriate hyperlink (<a>) tag.

We normally use the target attribute to load a document into a specific frame that you've named in a frameset. It also serves to create a new window by one of two methods:


Previous Home Next
Transparent Images Book Index Multiple Frames in One Link

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell