[whatwg] Definition of alt= attribute

Hi,

From: Ian Hickson <ian@hixie.ch>
>I've considered making alt="" and omitting alt be conformant equivalents.
>I haven't really thought much about it yet though.

Lynx shows the file name if alt="" is ommitted. IIRC, HTML 4.0 previously 
recommended that UA's should use the file name if alt is ommitted, so to 
avoid HTML 4.0 compliant UA's using the file name when we want it to be 
empty, I think it is reasonable to require alt when src is present (and vice 
versa).

Using the file name when the alt attribute is ommitted might make sense in 
some cases, such as:

   <a href="/"><img src="home.gif"></a>

...but not in others, such as:

   <img src="spacer.gif">

Regards,
Simon Pieters

Received on Saturday, 21 January 2006 06:49:28 UTC