5

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.

2

2 Answers 2

8

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

Sign up to request clarification or add additional context in comments.

1 Comment

@John thanks for a great answer and the rebuildingtheweb link.
5

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.

1 Comment

Just discovered the Android browser doesn't display title on img :(( code.google.com/p/android/issues/detail?id=5836

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.