Ed Seedhouse wrote: > The alt tag should contain a description of the image.
No, in general it should contain a replacement for the image. But this is off-topic in the list, so I will comment on the _styling_ related issues of alt attributes. > If you were > viewing your page without images, what would you want the tag to say > to replace it? (Usually something else than a description.) > If your image can't be so described then it is > decoration and should be brought in via CSS, not your html. While this sounds theoretically correct, there is a practical problem. Decorative images in CSS means (at least for now) using _background_ images. When a page is printed, background images are normally omitted. So this should be considered when deciding whether to use background or content images. Usually it's OK to omit decoration in print, but not always. Another CSS-related issue is that many people have used alt attributes to create "tooltips", like annotations on the images. This tends to interfere with the proper use of such attributes. Moreover, the "tooltips" are rendered in a manner that is immune to everything you say in CSS, using system routines. The rendering has many drawbacks, like the disappearance of the "tooltip" after some seconds, which is really annoying if the text is long and you'd like to read it. Therefore, if you want to show "tooltips", it's better to do that with CSS (or CSS + JavaScript), e.g. including explanatory text in document content, hiding it with CSS, and making it visible in a particular position. It's useful then to add title="" (i.e., title attribute with empty value), as this will prevent some browsers from displaying the alt attribute value as "tooltip". -- Yucca, http://www.cs.tut.fi/~jkorpela/ ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/