[whatwg] Definition of alt= attribute

Simon Pieters zcorpan at hotmail.com
Sat Jan 21 06:49:28 PST 2006


Hi,

From: Ian Hickson <ian at 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





More information about the whatwg mailing list