W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] Definition of alt= attribute

From: Simon Pieters <zcorpan@hotmail.com>
Date: Sat, 21 Jan 2006 14:49:28 +0000
Message-ID: <BAY109-F25A2205D4920BBD747E235B41E0@phx.gbl>

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 

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">

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC