[whatwg] Image maps: should we drop <a coords="">?

Lachlan Hunt lachlan.hunt at lachy.id.au
Mon Apr 11 19:02:33 PDT 2005

Ian Hickson wrote:
> Client-side with <a> (doesn't work in WinIE6, works in Moz, Opera):
>    <img usemap="#foo"> (or <object usemap="#foo"></object>)
>    <map id="foo">
>     ...
>     <a coords="..." ...></a>
>    </map>

I've never seen that used at all either, most likely because it doesn't 
work in IE and because every single tutorial I've ever seen only teaches 

> While it is definitely a better design than <area>,it isn't a
> substantially better design,

How so?  Although <a> might have a slightly less presentational name 
than <area>, the semantics of both are identical when used for an image map.

> I believe we can take the opportunity to prune the spec without ill effect.

I don't see any harm in either keeping it or removing, but there's not 
much point to having it either.

> Anyone want us to keep <a coords="">?


One request though.  When this section of the spec gets written, can you 
provide an example with less presentational abuse than HTML 4 does. 
Using it just to provide a navigational toolbar is innappropriate, 
because the same can be, and has been, achieved with CSS.

Image maps should be used to describe the structure of an image and to 
indicate significant areas within it.  The simplest and most often used 
non-presentational example I've seen is a world map, but perhaps 
something like highlighting sections of a photo, for which there are 
close-up pictures available.

<img src="/images/park" usemap="park" alt="...">
<map id="park">
   <area coords="..." shape="rect" href="swings" alt="Swing Set"
         title="Close up photo of the swing set">
   <area coords="..." shape="poly" href="tree" alt="Old Willow Tree"
         title="Close up photo of the old, gnarled willow tree">

Lachlan Hunt
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox

More information about the whatwg mailing list