Jump to content

Use of alt and title


kurt.santo

Recommended Posts

As far as I know you use the alt attribute of a pic to give an alternative text if the picture itself is not available. The title attribute should indicate what happens when you click upon. Does this mean that if a pic does not serve as a link you won't use the title tag? Also, how do you deal with a page, which has lots of photos, which also act as links (to open bigger picture). It would be quite tedious to give each one a unique alt and title attibute...Kurt

Link to comment
Share on other sites

As far as I know you use the alt attribute of a pic to give an alternative text if the picture itself is not available. The title attribute should indicate what happens when you click upon. Does this mean that if a pic does not serve as a link you won't use the title tag? [...]
Don't forget the title is rendered as a tooltip (by IE and FF at least) so with careful use it can be effective in presenting supplementary information about the object being hovered over.
[...] Also, how do you deal with a page, which has lots of photos, which also act as links (to open bigger picture). It would be quite tedious to give each one a unique alt and title attibute...Kurt
The same way you deal with anything tedious, I guess... :) you're creating a document that will present information to people, and those attributes are potentially a useful part of each element, so it's probably worth a few moments of thought about each one...
Link to comment
Share on other sites

The title attribute should indicate what happens when you click upon.
The title should be presented to the client when you Hover on it. IE gets it wrong by using the Alt tag information instead, and ignoring the title tag, afaik.
Link to comment
Share on other sites

[...] IE gets it wrong by using the Alt tag information instead, and ignoring the title tag, afaik.
Not quite! If only alt is present, IE6 and IE7 render that as a tooltip (leading some web developers to think that is the purpose of alt, and to be unaware of the existence of title). But in fact if title is present, IE6 and IE7 render title as a tooltip, whether or not alt is also present. I don't know what browsers other than IE and FF do with title?
Link to comment
Share on other sites

Not quite! If only alt is present, IE6 and IE7 render that as a tooltip (leading some web developers to think that is the purpose of alt, and to be unaware of the existence of title). But in fact if title is present, IE6 and IE7 render title as a tooltip, whether or not alt is also present. I don't know what browsers other than IE and FF do with title?
Recent versions of FF, IE, Opera, NN display content of title tag as long as there is no empty string. Safari does not render anything (even when there is a string supplied)... Opera displays it as "Title: yourTextHere", which is not the greatest...Have to think about employing my little cousin to enter all the necessary text for my alt and title tags. He is 3 and might enjoy to spend hours on my laptop;-)Kurt
Link to comment
Share on other sites

Not quite! If only alt is present, IE6 and IE7 render that as a tooltip (leading some web developers to think that is the purpose of alt, and to be unaware of the existence of title). But in fact if title is present, IE6 and IE7 render title as a tooltip, whether or not alt is also present.
Thanks for that information.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...