I happened to come across this anomaly today. Internet Explorer and Firefox both seem to have different policies while using the title and the alt attributes for the <img> tag.

If an <img> tag for example, had both the title and the alt attributes specified, then these two browsers will display the value present for the title attribute when you hover the mouse on the image. But if the title attribute is not specified for the image, then Internet explorer takes the liberty of showing the text specified for the alt attribute specified for the image as the tooltip when you hover the mouse over the image. However, firefox remains stable and does not do this.

I took a look at the html spec to see what it said about using the alt text if title wasnt specified.  But there wasnt anything mentioned about what action a browser should take if the value of title attribute wasnt specified. I guess this is another instance of IE taking implementation in its own hand and defining its own rules that we have to be aware of.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by venky