Greetings,
How can I add "Alt Tags" to text.
Easy to do to images but can't figure it out on text.
As always thanks in advance!!!
Jack![]()
| SitePoint Sponsor |
Greetings,
How can I add "Alt Tags" to text.
Easy to do to images but can't figure it out on text.
As always thanks in advance!!!
Jack![]()
North to Alaska !


use the TITLE attribute instead
by the way, ALT is not a tag, it is an attribute of the IMG tag



Not just the img element but AREA, APPLET, and INPUT as well...
But like I said in another forum you posted ... what would be the purpose of adding an alt (or title) attribute? ALT is to add alternate text for when you have an image or an element you are using that doesn't display text, and title is basically the same thing.
The alt and title attributes


ALT is an attribute which provides alternate content (a text equivalent) for non-textual information. It is displayed, for instance, instead of an image, if the image is unavailable or unsupported.
You can't have a text equivalent for text, that would be displayed instead of the text, because it defies reason.
If you want a tool-tip 'popup' for some text, use the TITLE attribute like Rudy said. Wrap the text in a SPAN if you don't have any other, more semantical, element type on which to set the attribute.
Birnam wood is come to Dunsinane
Could you give me a short example of that coding?
Thanks,
Jack
North to Alaska !


<p title="this is a tooltip">this is the paragraph</p>

the title attribute is especially useful for text links that will take the user away from the page they are reading.
Linda Jenkinson
"Say what you mean. Mean what you say. But don't say it mean." ~Unknown
Thanks to all for your help!
Jack![]()
![]()
![]()
North to Alaska !

People get confused because IE shows the alt text as a tooltip when there is no title present. Which is wrong.
What do you mean by ALT tag, that's an image tag...
-----------------
Jeffrey Kevin Pry


Lots of people say ALT tag when they mean ALT attribute.![]()
Birnam wood is come to Dunsinane
Bookmarks