target attribute is deprecated and its use as a
layout mechanism, like that of the
frameset, is no longer common. However, if you do find yourself having to
maintain a frameset-based web site, you may need to open links in frames
or windows other than the one in which the source of the link
targetattribute for the
aelement is set to
<p>You can try our <a href="cakes.html" target="_top">lovely range of cakes</a>.</p>
The attribute can take any of the following values:
loads content in a completely new window
loads content in a frame with a custom name
loads content in the parent
framesetfor the current
loads content in the same frame (This attribute isn’t normally required, as this is the default behavior unless the
baseelement specifies otherwise. In that case, you’d need to override the specification using
"_self"; for example,
loads content in the top-level
frameset(in effect, the whole browser window), no matter how many nested levels down the current
It causes no compatibility issues, and has excellent support across all tested browsers.
Note that many browsers open new windows in a new tab in the browser interface rather than a entirely separate window, but this still qualifies as ‘a pass’.
There are no comments yet.