English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <area> target attribute

The target attribute specifies where the linked document is opened, and it is only used when the href attribute exists.

 HTML <area> tag

Online Example

Image map with clickable areas and target attributes:

<!DOCTYPE html>
<html>
<title>HTML:<area> target attribute - Basic Tutorial Website oldtoolbag.com</title>
<body>
<p>Click the sun to observe it closely:</p>
<img src="planets.gif" width="145"height="126"alt="Planets" usemap="#planetmap">
<map name="planetmap">
  <area shape="rect" coords="0,0,82,126"href="sun.html" alt="Sun" target="_blank">
  <area shape="circle" coords="90,58,3"href="mercur.html" alt="Mercury">
  <area shape="circle" coords="124,58,8"href="venus.html" alt="Venus">
</map>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the target attribute

Definition and Usage

The target attribute specifies where to open the linked document.

Use only when the href attribute exists.

HTML 4.01 with HTML5differences

Frames and framesets are no longer supported. The _parent, _top, and framename attribute values are usually used with iframes.

Syntax

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

Attribute Value

ValueDescription
_blankOpen the linked document in a new window.
_selfDefault. Open the linked document in the same frame.
_parentOpen the linked document in the parent frame set.
_topOpen the linked document in the entire window.
framenameOpen the linked document in the specified frame.

 HTML <area> tag