area shape Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:area

Description

The shape attribute specifies the shape of an area, which is used together with the coords attribute to specify the size, shape, and placement of an area.

Attribute Values

Value Description
default Specifies the entire region
rectDefines a rectangular region
circle Defines a circular region
polyDefines a polygonal region

An image-map, with clickable areas:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<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="">
  <area shape="circle" coords="90,60,5" alt="B" href="">
  <area shape="circle" coords="130,60,10" alt="C" href="">
</map><!--  w  ww  .  j a v  a 2 s  . co  m-->

</body>
</html>

Related Tutorials