The retrieved resource is normally opened in the same browser window, sort of like going to a new page in a book.
To open the new document in a different window, we set the element’s target attribute.
HTML provides the following predefined target names:
NOTE: Target names are case sensitive.
Target |
Description |
_blank |
Load this link into a new, unnamed window. |
_self |
Load this link within the current frame. |
_parent |
Load this link into your parent frame (same as self if current frame has no parent). |
_top |
Load this link at the topmost level (same as self if current frame is at the top). |
<a href="intro.html" target="_blank">Introduction</a>
Be very wary to use the _blank option only as necessary, like when you refer to documents external to your site. It would be very annoying if all your links opened in a new browser window.