I am trying to learn how to make a simple website in HTML. Currently I have created a background image that image has multiple shapes on it. I want different parts of the im
There are numerous disadvantages to using the HTML image / system in your HTML pages. Most notably because when the image itself will (should) be scalable and dynamic based on client screen size, the process of adjusting the clickable elements relating to the image to whatever size display is required, simply doesn't exist here.
As HTML elements are absolute in their scale and size, they will not work with dynamicly sized content (width:80%, etc.).
What can you do instead?
There are a few options. There are some Javascript systems you can find that will dynamically resize the area boundaries when it detects the window (re)size. These will of course add some overhead as well as JS bloat to page loads.
OR Wait for it, there's a drumroll coming... can you hear it?
USE SVGs
Yep - Scalable Vector Graphics are the future present with regards to image-mapping clicks without the Javascript overhead, you can read about them on their wiki or on MDN.
So, using SVGs you can import a standard image format (such as JPG, etc.) and then overlay this with anchor points and clickable elements that you can style with CSS-like styling, which gives vastly more support and possibilities than the old syntax, such as fades, hovers, blends and blurs all happening on static images due to user interaction, at any set point, on any sized screen.
Show me How!
Highly Recommended is this tutorial on making an SVG clickable area map on an HTML image element.