This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Please visit the attached URL for a concise description and an example of this problem. In a nutshell: The content of the "usemap" attribute in an image tag MUST begin with a "#" character in order for its associated image map to be functional. However, the code will NOT validate if the "#" character is present. Googling this problem has resulted in repeated claims that the validator is wrong, and that the code with the "#" is valid XHTML 1.1. Can you verify this for me, or, barring that, explain how to make the code both validate and function properly? Thank you.
Don't trust Google, the validator is correct :) In XHTML 1.1, usemap is defined as IDREF, and IDREFs cannot start with "#". http://www.w3.org/TR/REC-xml/#idref If you want your image maps to work with mainstream browsers and your documents to validate, use XHTML 1.0 (see also below). It defines usemap as CDATA (through &URI;), and you can happily use usemap="#foo" which, unlike the XHTML 1.1 version usemap="foo", works with most browsers. XHTML 1.0 is the current de facto recommendation for HTML, by the way; there are very few if any browsers out there that really support XHTML 1.1. http://www.w3.org/TR/html/
The "#" is not supposed to be used. Mozilla 1.7 correctly uses the image map. Here is a sample piece of code: <img style="border-width:0px" src="packages.jpg" alt="packages" usemap="doodles" /> and later: <map id="doodles"> <area shape="rect" alt="Package 58" coords="290,75,310,95" href="doodle.html" /> <area shape="rect" alt="Hyman Stadium" coords="69,10,215,42" href="doodle2.html" /> </map> This works in Mozilla, but not IE. I had the same problem. Signed, gohankid77