Horje

How to add HTML <object> usemap Attribute

An <object> element using an image map:

index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The object usemap attribute</h1>

<object data="https://horje.com/uploads/demo/2024-09-29-14-25-40-screenshot_2024-09-29_at_20-23-53_w3schools_online_html_editor.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 HTML <object> usemap Attribute




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