shape (HTML attribute)
| Depr. | Version |
|---|---|
| No | HTML 3.2 |
| IE7 | FF1+ | SA3 | OP9.2+ |
|---|---|---|---|
| None | Full | None | Full |
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 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 1.0 | 1.5 | 2.0 | 1.3 | 2.0 | 3.0 | 9.2 | 9.5 |
| None | None | None | Full | Full | Full | None | None | None | Full | Full |
This attribute isn’t well supported. Safari and Firefox 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.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.