[Yulwww] alt / title tags in IE/Firefox

Karen Reardon karen.reardon at yale.edu
Fri Jun 24 15:44:37 EDT 2005


Bonnie Turner just questioned why the text stored in <alt> tags 
doesn't display in Firefox and wondered if she should use the <title> tag 
instead. This is a great question and I'm sure others will see this 
behavior - if you haven't already.

What she is seeing is correct and actually is appropriate behavior for 
the browser according to the W3C spec.

According to the W3C spec - the <alt> tag is only supposed to be displayed 
if the image can't be viewed - since normally the image is displayed 
correctly you shouldn't see it. You aren't supposed to see the <alt> 
text unless the image was unavailable or 
you were using a 'reader' to read the page to you. IE shows the <alt> tag 
content no matter what  - Firefox displays it only when necessary 
- following to the W3C spec guidelines.

You can use the title attribute to give extra information about the           
image, such as its title. You can in fact use the title attribute in this
way for any HTML element, not just images. The <title> tag content shows 
in both browsers all the time.                          
                   
You do not need to include <title> tags if you do not wish to - the 
browser will behave correctly with the <alt> tag in place - you just won't 
see the content in Firefox (as we are all used to seeing in IE).

?'s please post back to the list.

-kmr





More information about the Yulwww mailing list