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
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|