One of the side benefits that came out of the HTML for frames is the ability to open a link in a brand new page. Using the
target attribute will open the link as a full-sized, fully-functional new window. Some browsers will open targeted links in new tabs.
Normally, you use the target attribute (on the
A element) to open links in a frame already on the web page. The frames are named in the
FRAMESET, and the target then opens the link in the named frame.
But if you target a frame that doesn’t already exist, the browsers will open a brand new browser window. For example, you can target a frame called
new_page. Because that frame name doesn’t exist, the browser will open the link in a new window or tab, and call that window “new_page.”
<a href="/library/weekly/aa030600a.htm" target="new_page">
Every link that is targeted to the “new_page” window will open in that same window.
If you want every link you write to open in a different new window, you could give them all different names, or you could use the special target
If you put the tag
<base target="_blank"> in the
HEAD of your page, all links on that page will open in a new window.