HTML <area> targetAttributes

HTML area 标签参考手册HTML <area> Tag

Example

Image map with clickable areas and a target attribute:

<img src="planets.gif.html" width="145" height="126" alt="Planets"
usemap="#planetmap">

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm.html" alt="Sun"
target="_blank">
<area shape="circle" coords="90,58,3" href="mercur.htm.html" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm.html" alt="Venus">
</map>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the target attribute.


Definition and Usage

The target attribute specifies the target of the link in the area.

Only use the target attribute if the href attribute is used.


Differences between HTML 4.01 and HTML5

No longer supports Frames and framesets. _parent, _top, andframenameAttribute values are commonly used in iframes.


Syntax

<area target="_blank|_self|_parent|_top|framename">

Attribute Values

Value Description
_blank Opens the linked document in a new window.
_self Default. Opens the linked document in the same frame.
_parent Opens the linked document in the parent frameset.
_top Opens the linked document in the entire window.
framename Opens the linked document in the specified frame.


HTML area 标签参考手册HTML <area> Tag

Other Extensions