HTML area shape Attribute
HTML <area> tag
Definition and Usage
The shape attribute specifies the shape of an area in a specified object or
image.
Used together with the map element and
coords attribute.
Syntax
<area shape="link_shape" />
|
Syntax Example
Attribute Values
Value |
Description |
default |
The entire area. |
rect |
A rectangular region. |
circle |
A circular region. |
poly |
A polygonal region. |
Browser Support
The attribute is supported in all major browsers.
Example
Source |
Output |
<p>Click on one of the planets:</p>
<img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap"
/>
<map id ="planetmap"
name="planetmap">
<area shape="rect" coords ="0,0,82,126" href ="sun.htm" alt="Sun" />
<area shape ="circle" coords ="90,58,3" href ="mercur.htm" alt="Mercury" />
<area shape ="circle" coords ="124,58,8" href ="venus.htm" alt="Venus" />
</map>
|
Click on one of the planets:
|
Try-It-Yourself Demos
area shape
attribute example
Set the shape of the area in the image map.
HTML <area> tag
…
|