[thelist] To ALT or not to ALT?

Aylard JA (James) jaylard at equilon.com
Mon Jan 15 14:09:34 CST 2001


> Are there any other reasons, besides validation and screen readers, to use

> empty ALT tags instead of just leaving them out?

	A bit slow on the draw on this thread, but there is one reason for
using alt attributes on <img> elements that I don't think has been mentioned
(my apologies if it has been): it is *required* by the HTML 4.x
recommendation:

"The alt attribute must be specified for the IMG and AREA elements. It is
optional for the INPUT and APPLET elements."

	...and further to the question of whether to use an empty string
("") on spacer images:

"Do not specify irrelevant alternate text when including images intended to
format a page, for instance, alt="red ball" would be inappropriate for an
image that adds a red ball for decorating a heading or paragraph. In such
cases, the alternate text should be the empty string (''). Authors are in
any case advised to avoid using images to format pages; style sheets should
be used instead."

http://www.w3.org/TR/html401/struct/objects.html#adef-alt

James Aylard




More information about the thelist mailing list