W3C home > Mailing lists > Public > www-validator@w3.org > February 2004

Re: Problem with validator and client side Image Map

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 16 Feb 2004 16:58:57 +0200 (EET)
To: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0402161652040.9356@korppi.cs.tut.fi>

On Mon, 16 Feb 2004, Allan Smith wrote:

> I have a problem with an IMAGE map at
> http://www.telfordsteamrailway.co.uk/newcss/detailedfindus.shtml

You're using XHTML 1.1, which is incompatible with XHTML 1.0 and HTML 4
and, more seriously, with browsers.

> The error message objects to
> usemap="#fpmap0"
> saying that '#' is not permitted

Because in XHTML 1.1 that attribute's value must be an identifier.

> but if I take the # out it validates - but doesn't work

Quite right. (You currenly have a name="..." attribute in <map>, too.
It does not validate under XHTML 1.1, which requires you to use id="...".
I haven't checked whether browsers would support id="...".)

> What did I do wrong?

You started using XHTML 1.1, which is a specification written as an
exercise in futility. Upgrade to XHTML 1.0 or, better still, to
HTML 4.01.

On the other hand, you probably shouldn't use an image map containing just
one area. It's rather pointless. Links want to be links. In fact, most
pages with image maps would be considerably better if the image maps were
replaced by links. This isn't really about validation, except that you
avoid a few validation issues that way too, but I'm just answering your

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 16 February 2004 09:58:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:38 UTC