Jump to content

Both alt="text" title="text". Any negative implications?


Recommended Posts

alt is not intended for tooltip at all. That's a mistake with Internet Explorer.Alt: An attribute used to display some text in the place of the image if the image was not loaded.Title: An attribute used to show some text in the tooltip above any element when you pass the mouse over it.Never use alt with the intention of showing tooltip text.Here's the correct usage of alt and title:<img src="house.jpg" alt="[image of a small white house]" title="This is my house!">

Link to post
Share on other sites
Yes, that will work.
I'm aware of that. My question was more in line with why would you use that on every element that has an onclick handler.
Link to post
Share on other sites

'alt' abreviation for alternate, as in alternet text. title is pretty self explanatory.although in firefox i'm sure alt brings up a tooltip :S might be wrong.:)

Link to post
Share on other sites
'alt' abreviation for alternate, as in alternet text. title is pretty self explanatory.although in firefox i'm sure alt brings up a tooltip :S might be wrong.:)
Only Internet Explorer does it. I use Firefox and Opera all the time and neither of them do that.
Link to post
Share on other sites
why would you use [a title] on every element that has an onclick handler.
Well, maybe not every one. :) Remember I'm mostly into web apps, so if a button label or icon might be misunderstood (murphy's law) I'll use a title. But if I've got a spreadsheet sort of thing, then, no, I don't have a title for each cell. "Enter data here. Enter data here . . ." That would be frustrating.When I'm feeling really clever, if one part of the app turns another part off, then I'll null the corresponding title. (Yeah, my scripts can be long.) Basically, I try to use best practice for any good gui. I actually imitate Firefox a lot, since it's always right here.I've never actually written a kill_all_titles function, but I've considered it. Problem is, I'd want a restore_all_titles function, and I've never taken the time to work out that part.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...