2

So I am working on a project requiring the use of img maps. I have little experience with them and have been trying to understand why their last area tag is usually as follows.

    <img class="img_class" id="squares" src="../images/squares.jpg" usemap="#sq_map">
    <map name="sq_map">
      <area shape="rect" href="#" coords="120,40,200,120"  title="blu"  id="1" alt="blu_sq"/>
      <area shape="rect" href="#" coords="120,200,200,280" title="red"  id="2" alt="red_sq"/>
      <area shape="default" nohref="nohref" alt="">
    </map>

I have my main map set up of my clickable areas but I am not sure what that third tag is for. Is it to block the default process when the image is clicked on or something along those lines? Google has been surprisingly unfruitful on this topic but I will keep looking in the mean time. Thank you for the help!

Mike
  • 632
  • 7
  • 22

1 Answers1

0
<area shape="default" nohref="nohref" alt="">

shape="default" means select the entire region.
nohref means no link is associated.

Hope this may help you. :)

Sudhanshu sharma
  • 1,917
  • 3
  • 20
  • 29
  • I figured that's what was happening. My boss was telling me to read up on why it's there but through my own experimenting I can only see a use existing if I need the whole img to fire an event of some kind, otherwise it is an unnecessary addition. That does help though, you have completely confirmed my suspicions. – Mike Aug 22 '16 at 17:56