Horje

How to add An <object> element using an image map - HTML usemap Attribute

Note: The usemap attribute of the object element is not supported in Chrome, Edge, Safari, and Opera.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The object usemap attribute</h1>

<object data="https://horje.com/avatar.png" width="145" height="126" usemap="#planetmap"></object>

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
  <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
  <area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p><b>Note:</b> The usemap attribute of the object element is not supported in Chrome, 
Edge, Safari, and Opera.</p>
 
</body>
</html>

Output should be:

How to add An <object> element using an image map - HTML usemap Attribute




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