target (HTML attribute)
Example
The base
target is defined here as a named window
"right":
<base href="http://lloydi.com" target="right" /> … I've published my <a href="/travel-writing/">holiday diaries</a>, including the <a href="/travel-writing/prague/2006/day2.html">crazy bone church at Kutna Hora</a>
Description
The
target attribute in the base
element is almost certainly going to be used in the context of a frameset, where you wish
all links from a document in one frame to open in another
named frame; you might also use it in the context of an
iframe, where you
wish all links from the ‘host’ document (that contains the
iframe) to open the destination of the links inside
that floating frame (although this is a much less likely scenario than the
frameset one).
Value
Refer to
the value section for the a element for all the
possible values in the target, and their
meaning/use.
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
Causes no compatibility issues. It has excellent support across all tested browsers.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

