More on IMG ALT (was Re: Questionable implementation of IMG ALT attribute as tooltips)

Walter Ian Kaye (walter@natural-innovations.com)
Mon, 26 Jan 1998 12:53:34 -0800


Message-Id: <v03010d07b0f2a6021eda@[134.79.129.61]>
In-Reply-To: <199801261506.KAA06519@geode.ora.com>
Date: Mon, 26 Jan 1998 12:53:34 -0800
To: www-html@w3.org
From: Walter Ian Kaye <walter@natural-innovations.com>
Subject: More on IMG ALT (was Re: Questionable implementation of IMG ALT  attribute as tooltips)

At 10:06a -0500 01/26/98, Chris Maden wrote:
>[James Green]
>> So the "" *does* work then??! Do you *know* that it is valid syntax?
>
>It's valid syntax.  The null string satisfies a CDATA restriction for
>an attribute type.
>
>> My my, I presume you've not heard of HTML 4.0 then? The ALT
>> attribute is a requirement.
>
>Yes, and the null string satisfies the requirement.  What is required
>is that *something* is specified, and specifying nothing is different
>from not specifying anything.

Actually, it depends on the browser. Some versions of Lynx, and MSIE,
treat <IMG SRC="foo.gif" ALT=""> the same as <IMG SRC="foo.gif"> --
the null attribute value is minimized to attribute absence, resulting
in the ugly "(Image)" text being displayed. :/  The workaround is to
specify *something*, most popularly a space (ALT=" ").

____________________________________________________________________________
  Walter Ian Kaye <boo@SLAC.Stanford.EDU>        Menlo Park, CA
  Perl on Unix, AppleScript on MacOS, at the nation's first WWW server.
  More good stuff at my <http://www.natural-innovations.com/> site.