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.

Received on Monday, 26 January 1998 15:55:22 UTC