HTML | <a> shape Attribute (original) (raw)
Last Updated : 11 Aug, 2021
The shape attribute is used with the coords attribute to describe the size, shape, and placement of a link in an or element. It is not supported by HTML 5.
Syntax:
Attribute Values:
- default: It is used to specify the entire region.
- rect: It is used to specify the rectangular region.
- circle: It is used to specify a circular region.
- poly: It is used to specify the polygonal region.
Example:
html `
HTML a shape Attribute <map name="shapemap">
<!-- a tag contained image. -->
<a href="https://media.geeksforgeeks.org/wp-content/uploads/20190227165802/area2.png" shape="poly" coords="59, 31, 28, 83, 91, 83"> Polynomial
<a href="https://media.geeksforgeeks.org/wp-content/uploads/20190227165934/area3.png" shape="circle" coords="155, 56, 26"> Circle
<a href="https://media.geeksforgeeks.org/wp-content/uploads/20190227170021/area4.png" shape="rect" coords="224, 30, 276, 82"> Rectangle
`
Output:
Before click on specific clickable area:

After click on specific clickable area:

Supported Browsers: The browser supported by HTML shape Attribute are listed below:
- Firefox
- Opera