English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The target attribute specifies where the linked document is opened, and it is only used when the href attribute exists.
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 ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the target attribute
The target attribute specifies where to open the linked document.
Use only when the href attribute exists.
Frames and framesets are no longer supported. The _parent, _top, and framename attribute values are usually used with iframes.
<area target="_blank|_self|_parent|_top|framename">
Value | Description |
---|---|
_blank | Open the linked document in a new window. |
_self | Default. Open the linked document in the same frame. |
_parent | Open the linked document in the parent frame set. |
_top | Open the linked document in the entire window. |
framename | Open the linked document in the specified frame. |