Re: GL's interpretation of null alt-text

On Wed, 10 Nov 1999, Charles McCathieNevile wrote:

> I agree with you that there is no particular problem in using  , except
> that you don't know how it will be rendered.

Well, there's a lot that one doesn't know about how HTML will be
rendered, and that is one of its strengths.

I'd say we have a clear idea of what is meant by 'foo bar', even
if there are limits to what we know about how it will be rendered.  
And we know that because   is not classified as white space[1],
the rules concerning the suppression of leading and/or trailing white
space do not apply to it.  It would seem to me that foo<IMG SRC=..
ALT="&nbsp;">bar, from the point of a text browser, is equivalent to
foo&nbsp;bar, and as such it is distinctively different from the
otherwise similar construct where ALT="".  And would, one hopes, be
indexed differently.

[1] http://www.w3.org/TR/REC-html40/struct/text.html#h-9.1

> The specification explicitly
> says leading/trailing whitespace in attributes will be ignored, 

Indeed, but nbsp is not white space.

(and earlier in the thread)

>   What user agents ignore the space character in ALT=" "? 

I honestly don't know, also I'm not sure whether an isolated white
space counts as leading or trailing or neither.  I've used ALT=" "  
before, but in view of the uncertainty about this point, I'd be
willing (in appropriate situations) to use no-break space instead,
without a qualm.

I'm _not_ talking about formatting as such, but about maintaining a
separation between two text tokens separated by nothing but an image
(say for example a logo), that would otherwise in a text-mode browser
get run together and thus misinterpreted as a single word.

Hope this is useful.

Received on Thursday, 11 November 1999 09:09:15 UTC