| Depr. | Version |
|---|---|
| No | HTML 3.2 |
| IE8 | FF1+ | SA4 | OP9.2+ | CH2 |
|---|---|---|---|---|
| None | Full | None | Full | None |
Syntax
Description
The
shape attribute allows the author to define some
simple area hotspots, using "rect" or
"default" for rectangles, and
"circle" or "poly" for more complex
polygonal shapes. It’s applied to the a element in the
context of an object
element. Refer to the Descriptionof
the coords attribute for a full rundown of how this
attribute works (or rather doesn’t work) in this
context.
Example
Here, the
shape attribute for a hyperlink is set to
"poly" (for polygon):
<a href="theweasel.html" shape="poly"
coords="136,238,137,301,3,306,3,242">Thursday's mustache -
'The Weasel'</a>
Value
This attribute can take
values of "circle", "default",
"poly", and
"rect".
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| None | None | None | None | Full | Full | Full | Full | Full | None | None | None | None | Full | Full | Full | None |
This attribute isn’t well supported. Firefox and Opera correctly position the links over the top of the image referenced in the object element; however, Internet Explorer and Safari don’t position the links, and thus render the technique useless.
Refer to the
Compatibility section of the coords
attribute for more details.
User-contributed notes
There are no comments yet.