HTML and CSS Reference
Target names for browser windows and tabs
Opens the link in a new window or tab named target
Opens the link in a new, unnamed window or tab
Opens the link in the current browser window or tab
Whether the new page is opened in a tab or in a browser window is determined by
the browser settings. It cannot be set by the HTML code.
Opening a Link in a New Window or Tab
• To open a link in a new browser window or browser tab, add the attribute
target=” window ”
to the <a> tag, where window is a name assigned to the new browser window or tab.
The target attribute can also be set to _blank for a new, unnamed browser window or
tab, or to _self for the current browser window or tab.
Gerry suggests that all of the external links from his page be opened in a browser win-
dow or tab identifi ed with the target name new .
To specify a link target:
1. Return to the tips.htm file in your text editor.
2. Scroll to the bottom of the file and locate the four links to the external Web sites.
3. Within each of the opening <a> tags, insert the following attribute, as shown in
Setting a target for hyperlinks