Launch and Open Links in New Window or Tab with _blank or _new as Target in HTML and Their Difference
On most websites, publishers may prefer to open the links to other web pages, especially external links that open web pages out of their own sites, in a new web browser window or tab, as most of the time, clicking on a link will load the new document from the link in the same window with where the link was. In HTML web programming language, to launch the new document (web pages) from links in a new window or tab effect is typically done through the use of target attributes on those links.
In this case, the link anchors will be using “_blank” as the value of the “target” attribute. “_blank” tells the web browser to open the new document loaded from the link in a new window. “target” attribute is also used in websites with frame structure to tell the web browser which frame the target page of a link should open when click. However, “_blank” does not require the use of any frames. The syntax or HTML code is typically as below:
<a href=”newwindow.html” target=”_blank”>New Window</A>
There are also publishers who use “_new” instead of “_blank” as the value for “target” attribute to open a link in new window. There is actually no “_new” defined as frame target names by W3C HTML standards. The only four reserved names are “_blank”, “_parent”, “_self” and “_top”. However, the “_new” value works the same way as “_blank” to launch the linked web documents in new browser window because of graceful error handling by web browsers. So “_new” is not a valid value for “target” attribute in link <a> anchor, and may cause inconsistent behaviour for strictly HTML compliant browser that ignores all other target names as frame target name should begin with an alphabetic character (a-z and A-Z).
When “_new” is used, the web browser will look for an existing browser window that carries the “_new” handle name. If there is none then browser will create and launch the target web document at new window (or new tab in browser that supports tabbed browsing), where browser is considered to be recovering from HTML error of targeting a non-existent window. In this case, the new window will be named “_new”. However, if a window or a tab with “_new” handle already existed, the target page will be loaded into that window instead. Theoretically, you no need to use “_new” as the value for “target”, as any other value name (i.e. “newwindow” or “newtab”) will work to create a new window if the so named window hasn’t existed yet when clicked on the link.
In other word, if you want the links to open in a new window on every click, use the “_blank”. And you can use “_new” or another other valid value name starting with alphabetic character to open a new window and re-use that window for any other subsequent clicks that target to the same name.
Related Articles
- How to Open Links in New Tab in Safari
- How to Open and View or Extract CHM (Compiled HTML) Files in Linux
- Add Open Command Window Here to XP Folder with PowerToy
- Open Elevated Command Prompt Window Here as Administrator at Current Folder Directly in Vista Windows Explorer
- How to Identify and Know Where A Link Will Open in Safari
- Solution: Transfer from Window XP to Window Vista
- Run Separate Isolated IE8 Window Frame Session with NoMerge Switch for Multiple Logins
- Difference Between XP and Vista on Arrangement Sequence Start Menu Recent Programs
- HTML-PDF-Converter Online Service to Convert Webpage to PDF Files
- ZAGG’s invisibleSHIELD Protective Film Hits Target Stores Nationwide










































November 10th, 2009 01:54
Thanks this was great! Found an other solution
http://social.msdn.microsoft.com/forums/en-US/iewebdevelopment/thread/8aedc1bc-f588-4bb8-a4a9-0674ad1d1101
October 28th, 2009 17:07
I always forget this code although I did it more than hundreds times. Thanks!
October 18th, 2009 18:38
Thank you,great information!
October 12th, 2009 03:11
Many thanks!!!
September 4th, 2009 21:38
really good post
thanks
July 3rd, 2009 20:43
Thenk you!
June 24th, 2009 20:36
very informative. Thank you.
January 13th, 2009 19:31
Great post thank you.
I want to ask a question. How can i open a page in a new tab in IE7? What can i use instead of window.open in javascript?
Have you got any idea for this?
November 7th, 2008 19:55
Very helpful. Wondering if there’s a way to provide some sort of command to make the URL open in a tab only.
Any thoughts or knowledge is most appreciated!
April 10th, 2008 13:42
Your blog is so helpful. Thank you.
December 24th, 2007 12:41
Great Post! Important piece of information.
July 9th, 2007 23:27
thank you…