I want a border around the active link part of the image that is defined by the coordinates. I currently have implemented to the extent that when the user clicks, the outline is visible by using: outline-color, thanks to href. I need a border around the coordinates specified by default. I am not very much experienced in CSS, so some guidance would be appreciated. If I need to mark it at respective intervals. Would use of javascript be a good practice?
<!DOCTYPE html>
<html>
<style>
img[usemap], map area[shape]{
outline-color: #F00;
}
</style>
<body>
<img src="unnamed.png" usemap="#mark">
<map name="mark">
<area shape="rect" coords="10,10,50,50" href="#">
</map>
Well what I can see from this is that you're not really using an anchor tag but an area tag, however I'm presuming this is the method you're choosing over using an anchor tag. Follow this:
or if you want to do this with an actual anchor tag maybe