Alt attribute vs Title attribute

The alt attribute should be used to display alternative (hence alt) text in the event that an image is not loaded. This might be due to a missing image, browser settings or the browsing interface.

IE uses the information in the alt attribute to display the “tooltip” that hovers when you mouseover an image.

This is not the correct implementation of this attribute.

The title attribute should be used for the “tooltip” purpose.

Firefox correctly interprets the title attribute, using that information for the tooltip.

So remember to include both the alt and title attributes when coding – but please don’t abuse them for SEO purposes!!


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: