The HTML Target Attribute for Anchors
The Anchor tag attribute for target tells the web browser where to open
the link. There are 4 defined target presets which come in handy for many
web designers of all levels. They are _blank, _self, _parent, and _top. You
can also specify a descriptive name with the underscore( _ ).
- _blank will open a new browser window with no name.
- _self will replace the current html page, so if it is in a frame or
frameset it will load within that frame. If it is the full browser, it
will open to replace the page in the full browser.
- _parent will replace the html page it came from.
- _top will load in the current browser by replacing anything within the
browser such as a frameset.
A descriptive name is used when
- you want to use a named frame as your target, setting the frame name
in the frameset you want it to load into.
- you want for example say all your outside links to open in the same
window, name the target as one.
- you have popup windows that are for example larger images from a
thumbnail and you want them to always open in the same window, name the
target all the same.