Set the coordinates of the area in an image map in HTML?


To set the coordinates of the area in an image map, Use the cords attribute in HTML to set the coordinates of the area in an image map in HTML.

Example

You can try to run the following code to implement the cords attribute −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML coords attribute</title>
   </head>
   <body>
      <img src = "/images/html.gif" alt = "HTML Map" border = "0" usemap = "#html"/>
      <map name = "html">
         <area shape = "circle" coords = "154,150,59" href = "about/about_team.htm"
            alt = "Team" target = "_self" />
      </map>
   </body>
</html>

Updated on: 22-Nov-2023

837 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements