Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Possible Duplicate:
Also use alt tag as title on images

Alt text does not produce tooltips on Chrome (and maybe other standard compliant browsers).

The alt attribute specifies alternate text that is rendered when the image cannot be displayed (see below for information on how to specify alternate text ). User agents must render alternate text when they cannot support images, they cannot support a certain image type or when they are configured not to display images. (HTML 4.01 Spec, 13.2)

The standard compliant browser will display only the image, or when that is not possible, only the alt text.

I propose using:

<img title="This is a tooltip." />

Instead of, or in addition to:

<img alt="This is NOT a tooltip." />

EDIT: I am not sure, but I don't think alt is valid HTML5.


share|improve this question

marked as duplicate by Arjan, Shadow Wizard, Pops, kiamlaluno, tvanfosson Dec 6 '11 at 19:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 11 down vote accepted

Markdown actually supports both. This:

![Foo]( "Bar")

Turns into this:

<img src="" alt="Foo" title="Bar">

And looks like this:


share|improve this answer
Then shouldn't the image button produce ![Enter description here]( "") so that users can realize that they can add title text? – Mateen Ulhaq Dec 6 '11 at 6:15
@muntoo I suppose, but I doubt it would get used much; it's incredible how many images still have "Enter description here" as the alt text – Michael Mrozek Dec 6 '11 at 6:21
@muntoo, no. The alt text is there for those who cannot see the image. Most often, that text should be different from its title. – Arjan Dec 6 '11 at 8:01

Alt text does not produce tooltips on Chrome (and maybe other standard compliant browsers).

And what is the problem? This is how its spelt out in the specifications. alt is alternative, where you provide a text alternative to the pictorial content you're trying to display for users who cannot view the image. The distinction between title and alt is clear. If the user was confused, expecting what he typed in as the alt text to appear as title text, then we may have a problem with the user interface. But I presume this is not what you're asking for.

EDIT: I am not sure, but I don't think alt is valid HTML5.


Except where otherwise specified, the alt attribute must be specified and its value must not be empty

A corollary to this is that the alt attribute's value should never contain text that could be considered the image's caption, title, or legend. It is supposed to contain replacement text that could be used by users instead of the image; it is not meant to supplement the image. The title attribute can be used for supplemental information.

HTML5 specification edition for web developers

(Emphasis mine)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .