Why html image alt text doesn't work in Firefox and IE

Question

Why html image alt text doesn't work in Firefox and IE.

Answer

Unlike Microsoft Internet Explorer, Mozilla Firefox will not display the text used in the alternative tag since this text is meant to be used for accessibility and not meant as the text to be shown in the balloon text when the mouse is hovered over the image.

If you would like to have balloon text appear when the mouse hovers over an image add the "title" tag to the img html tag as shown in the below example.

Example of alt text
Image with only alt tag

<img alt="Example of alt text" src="http://www.computerhope.com/logo.gif">

Example of alt text
Image with alt and title tag

<img alt="Example of alt text" title="Example of title text" src="http://www.computerhope.com/logo.gif">

If you're using Mozilla Firefox you'll notice that the first example displays no balloon text with just the alt tag in the code. However, adding the title tag as seen in the second example will display balloon text when the mouse is hovered over the image.

Additional information