Use the shape attribute to specify the shape of each area in the image map.
The shape
attribute specifies the shape of an area.
The shape
attribute is used together with the coords
attribute to specify the size, shape, and placement of an area.
<area shape="default|rect|circle|poly">
Value | Description |
---|---|
default | Specifies the entire region |
rect | Defines a rectangular region |
circle | Defines a circular region |
poly | Defines a polygonal region |
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<h1>The area shape attribute</h1>
<p>Click on the sun or on one of the planets to watch it closer:</p>
<img src="https://horje.com/avatar.png" width="145" height="126" alt="Planets" usemap="#planetmap">
<map id="planetmap" name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="https://horje.com">
<area shape="circle" coords="90,58,3" alt="Mercury" href="https://horje.com/">
<area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
</body>
</html>
Type: | Html |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded by: | Admin |