HTML <a> shapeAttribute
Example
Use shape and coords in an <a> element to create an image map:
<object data="planets.gif" alt="Planets" type="image/gif" usemap="#Map1">
<map name="Map1">
<a href="sun.htm" shape="rect" coords="0,0,82,126">Sun</a>
<a href="mercur.htm"shape="circle" coords="90,58,3">Mercury</a>
<a href="venus.htm" shape="circle" coords="124,58,8">Venus</a>
</map>
</object>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Currently only Firefox and Opera support the shape attribute.
Definition and Usage
HTML5 no longer supports the shape attribute of the <a> tag.
The shape attribute, in conjunction with the coordsattribute, can specify the size, shape, and position of links in <object> or <img> elements.
Tip:: To create an image map that works in all browsers, use the<area>element!
Syntax
<a shape="value">
Attribute Values
| Value | Description |
|---|---|
| default | Specifies the entire region. |
| rect | Defines a rectangular region. |
| circle | Defines a circle. |
| poly | Defines a polygonal region. |
Other Extensions
HTML <a> Tag