target=”_blank” vs. target=”_new”
The target attribute of a link forces the browser to open the destination page in a new browser window. Using _blank as a target value will spawn a new window every time while using _new will only spawn one new window and every link clicked with a target value of _new will replace the page loaded in the previously spawned window. Try it out for yourself:
Links with target=”_blank”
Links with target=”_new”
target=”_new” is not a standard target value. You could use any term you like and any link that has the same target value will open in a previously spawned window. See the target=”booger” example below.
Links with target=”booger”
How can I force a link to open in a new tab instead of a new window?
There is currently no way to force a window to open in a new tab for browsers with this feature. This functionality can only be set in the preferences of the browser (see other resources section below).
What if I want the new window to display at a certain size?
The only way to do this is by using JavaScript. I recommend the method outlined at Quirksmode.org.
Other Rescources
- http://reference.sitepoint.com/html/a/target – Sitepoint reference for the target attribute.
- http://support.mozilla.com/en-US/kb/Options+window+-+Tabs+panel – How to configure Firefox to open new windows in new tabs.
- http://www.tech-recipes.com/rx/1164/internet-explorer-7-open-new-windows-in-tabs-in-ie7/ – How to configure IE7 to open new windows in new tabs instead.
Of course all of this is moot since opening pages in new windows is a usability annoyance.


