area target Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:area

Description

The target attribute specifies where to open the linked document.

Attribute Values

Value Description
_blankOpens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in a named frame

An image-map, with clickable areas, and a target attribute:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p>Click on the sun or on one of the message to watch it closer:</p>

<img src="https://www.java2s.com/style/demo/Opera.png" width="145" height="126" alt="message" usemap="#myMap">

<map name="myMap">
  <area shape="rect" coords="0,0,80,100" alt="A" href="" target="_blank">
  <area shape="circle" coords="90,60,5" alt="B" href="">
  <area shape="circle" coords="130,60,10" alt="C" href="">
</map><!-- ww w . ja  va 2 s.  c om-->

</body>
</html>

Related Tutorials