views:

347

answers:

3

When I use the alt attribute with img tag in Safari on Windows, instead of displaying the alternate text, Safari only shows a "?" in a box. Is this a bug in Safari on Windows, or Safari is missing this feature.

+5  A: 

Every browser has its own magical way of rendering alternate text. It seems to be a standards issue, hopefully to be resolved in the future HTML5 specs.

IE, Firefox, & Opera render the alternative text inside IMG for broken images. Chrome & Safari also do this, but the text will be cutoff you unless you set the height/weight of the image.

Here is an excellent article on the issue (with screen caps that show how each browser renders the alt text).

http://rebuildingtheweb.com/en/how-should-browsers-render-alt-text/

More screenies from the Paceillo Group's blog...
http://www.paciellogroup.com/blog/misc/HTML5/alt-tests/screenshots.html
http://www.paciellogroup.com/blog/?p=498

John Himmelman
@John thanks for a great answer and the rebuildingtheweb link.
movingahead
+4  A: 

Never use alt for rendering tooltips. Use title instead. It is supported by almost all browsers. alt is meant to be an alteranative text which should come only if the image is unavailable/cannot be displayed or for some Assistive technologies like screen readers while reading the page.

Aviator
@Aviator advice taken :)
movingahead
A: 

Hi ...

For dipslaying the tile text of an image in the iPad what can I do?

Thanks

Margaret