DEV Community

Harshil shah
Harshil shah

Posted on

2

HTML Image Map

With HTML image maps, you can create clickable areas on an image.

The HTML map tag defines an image map. An image map is an image with clickable areas. The areas are defined with one or more area tags.

<img src="workplace.jpg" alt="Workplace" usemap="#workmap">

<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.html">
  <area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.html">
  <area shape="circle" coords="337,300,44" alt="Coffee" href="coffee.html">
</map>
Enter fullscreen mode Exit fullscreen mode

To get the coordinates of the objects in the image you can visit the following websites:


You can also visit my website where image map is used

And you can find the above website's code at https://github.com/harshilshah99/greenPaddle/blob/main/public/accessories.html

Image of HTML image mapper from above website

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay