Forum Moderators: phranque

Message Too Old, No Replies

alt attribute on spacer giff's

how important

         

mossimo

3:04 pm on Apr 27, 2003 (gmt 0)

10+ Year Member



Any one know about alt attribute on spacer giff's
Is it really necessary, I can’t see any reason to include it nor can I see any consequence of its absence?

Let me know thanks.

dmorison

3:07 pm on Apr 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No consequence under traditional HTML.

If you've specified a DOCTYPE that mandates alt attributes for image elements then "technically" you should include one, but I don't know of a user agent (except [validator.w3.org...] ;) that is going to argue about it.

mossimo

3:11 pm on Apr 27, 2003 (gmt 0)

10+ Year Member



That’s what I thought dmorison just needed to hear some one say it.

matkat

4:15 pm on Apr 27, 2003 (gmt 0)

10+ Year Member



For spacer gifs or small images like arrows, etc. I use alt="" to take care of the validation.

g1smd

7:24 pm on Apr 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> I use alt="" to take care of the validation. <<

That is the best way to do it. The alt is a required element in HTML 4 and above, so you cannot leave it out; however the specification says nothing about giving the attribute value as a null value. So, by using alt="" you have used alt without having to put some mindless text in the value. Imagine how a blind surfer, using a talking browser, would feel to hear "spacer" read out hundreds of times when looking at your site?

davis

8:42 pm on Apr 27, 2003 (gmt 0)

10+ Year Member



I think the alt tab is more for users who dont automatically download images... and just go 'show image'... no one cares about looking at spacers, so dont include them :)

Personally, I think a spacer feature should be included into HTML... :)

g1smd

8:54 pm on Apr 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



HTML is to describe the structure of the document, paragraphs, headers, etc, not the layout of it; and that will become more important as ever more compact and portable "web-devices" are developed.