Reputation: 11
Can any one tell me where the error is in this html coding?
https://newmedia.leeds.ac.uk/ug10/cs10jy/portfolio/studenthands/imagemap.html
I have wrote this code but I cant seem to see where i'm going wrong after looking online and following tutorials...
<img src ="images/socialnetwork.png"
width="220" border="0"
usemap ="#socialmap" />
<map id ="socialmap"
name="socialmap">
<area shape ="poly" coords ="77,83,163,127"
href ="https://www.facebook.com/StudentHands" target="_blank" />
<area shape ="poly" coords ="1,105,75,153"
href ="https://twitter.com/StudentHands" target="_blank" />
</map>
Any help would be very much appreciated!
Upvotes: 1
Views: 8870
Reputation: 51
Change the id attribute of map tag with name attribute, it will work
Upvotes: 5
Reputation: 1019
Remove the linebreaks and the spaces between attribute and = in the code for the map. That should help.
try this
<img src="images/socialnetwork.png" width="220" border="0" usemap="#socialmap" />
<map id="socialmap" name="socialmap">
<area shape ="poly" coords ="77,83,163,127" href ="https://www.facebook.com/StudentHands" target="_blank" />
<area shape ="poly" coords ="1,105,75,153" href ="https://twitter.com/StudentHands" target="_blank" />
</map>
Upvotes: 1
Reputation: 66
<area shape ="poly" coords ="77,83,163,127"
href ="https://www.facebook.com/StudentHands" target="_blank" />
the coordinates doesnt form a polygon it can just make a line. the coords are taken as "x1,y1,x2,y2,......xn,yn" where n>=3
Upvotes: 1