Horje
HTML shape Attribute

Definition and Usage

The shape attribute specifies the shape of an area.

The shape attribute is used together with the coords attribute to specify the size, shape, and placement of an area.


Applies to

The shape attribute can be used on the following element:

Element Attribute
<area> shape

Browser Support


How to run An image map, with clickable areas - HTML shape Attribute

Click on the computer, the phone, or the cup of coffee to go to a new page and read more about the topic:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The map and area elements</h1>

<p>Click on the computer, the phone, or the cup of coffee to go to a new page and read more about the topic:</p>

<img src="https://horje.com/avatar.png" alt="Workplace" usemap="#workmap" width="400" height="379">

<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
  <area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>

</body>
</html>

Output should be:

How to run An image map, with clickable areas - HTML shape Attribute




html shape attribute

Type:
Develop
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference