Forum Moderators: open
Use the most specific one.
The title attribute may be used on most elements. It offers advisory information about the element for which it is set.
The alt attribute must be specified for image elements. So using alt which you are required to do and having a title attribute is IMHO redundant.
Andreas
The title attribute is "intended" for all users.
The main bit of browser craziness right now is what a browser shows in the tool-tip. The W3C recommendation is to show the title attribute, but Explorer shows the alt attribute, keeping the web off-standard.
If NS6 claims to support HTML4 or XHTML1 it better support the alt attribute:
[w3.org...]
Some of the comments here seem to be addressing the tool-tip, the little fly-out box that appears when you rest the cursor over an image. That "should" be the title attribute, when it's present.
The behavior of the tool-tip (how long it lasts, whether its text wraps, etc.) are up to the browser maker right now, as far as I know.
Many other uses for the title attribute exist. For instance, if an anchor tag has a title attribute, then Opera displays the title in the status bar instead of the "geeky" URL - that's much more user friendly, IMO.
I've been also been using title attributes for <blockquote>. It's there to help our site search function, mostly, because I don't think it gets used by any current SE. But it sure is helpful.
The alt attribute is required in HTML 4.01 as it is used by non-visual browsers such as speaking browsers and Braille browsers for the blind.
It is also used in place of the image if it fails to load on a visual browser.
Older browsers use the alt text as the pop-up text when you hover the mouse over an image. Newer browsers use the title attribute for the pop-up text.