Advertisement
Home Open Editor ❯

HTML <object> usemap Attribute

Example

<object usemap="#image-map" data="desk.jpg"></object>

<map name="image-map">
  <area target="_blank" alt="Computer" title="Computer" href="computer.png" coords="112,31,285,246" shape="rect">
  <area target="_blank" alt="Cup" title="Cup" href="cup.png" coords="327,212,31" shape="circle">
  <area target="_blank" alt="Mobile" title="Mobile" href="mobile.png" coords="296,121,326,176" shape="rect">
  <area target="_blank" alt="Book" title="Book" href="book.png" coords="53,132,115,157,72,237,2,211" shape="poly">
</map>

Try this code ❯

Meaning

The usemap attribute contains the URL of the image map to be used with the object.

Typically, the URL will be a fragment identifier referencing a map element somewhere else within the document.

The presence of this attribute specifies that the type of object being included is an image.


Standard Syntax

<object  usemap="hash-name">...</object>


Advertisement

Attribute Values

Value Description
hash-name name of the <map> element with prefix hash.
Home Open Editor ❯
Advertisement