HTML pet peeve

by Charles Miller on August 25, 2002

The alt attribute of the img tag is for replacement text—what you'd see if the image was not displayed at all. The test for alt-text is "If I saw this text instead of the image, in the same place in the page, would it make sense?

If you want something to accompany the image, and that will show up as a tooltip, use the title attribute.

Previously: Fellowship of the Ring, First Draft

Next: Sun, 25, Aug 2002 09:51:00 PM