Sigma Sigma - 5 months ago 12
HTML Question

html ismap not showing coordinates

I am taking an html course on udemy and the instructor has shown the following.

<a href="#">
<img src="html.png" width="400" height="250" ismap>
</a>


When he does this and then scrolls over the image it shows the coordinates in the lower left side of his screen, however when i enter the following,

<a href="http://creepypasta.wikia.com/wiki/The_Russian_Sleep_Experiment" target="new"><img title="Russian Sleep Experiment" src="http://scaredyet.net/wp-content/uploads/2015/02/timthumb-600x300-520x245.jpg" alt="Russian sleep experiment" align="left" width="300" height="200" ismap></a>


it does not show the coordinates when i scroll over it. I have been searching and i cannot find an answer to this. Thanks in advance

Edit:I also don't understand why the image is still showing even though he replaced it with a "#"
please advise

Answer

ismap is used to display coordinates appended the URL when an image is clicked on.

Your code is valid, check it out in this fiddle: https://jsfiddle.net/mbpv1kyq/

When you click the image you will be directed the image's original site with the (x, y) coordinates you clicked on appended to the end of the URL as such:

http://creepypasta.wikia.com/wiki/The_Russian_Sleep_Experiment?96,58

The 96,58 would be where you clicked.

As to

When he does this and then scrolls over the image it shows the coordinates in the lower left side of his screen

He most likely using Paint or another similar program to read of the coordinates when he hovers or he has set up some JavaScript function to read of the current mouse coordinates. Here is a screenshot of Paint, you can see the coordinates in the bottom left.

As to

I also don't understand why the image is still showing even though he replaced it with a "#"

The # symbol is normally used for in-page links. It will not make the img disappear, but it will break your link when you click on it because it doesn't reference anything.

Here are some references to help you better understand ismap:

W3 ismap

tutorialspoins ismap

Comments