SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
Thread: Adding ALT TAG to text in HTML
-
Oct 25, 2006, 05:56 #1
- Join Date
- Nov 2004
- Location
- Wilds of Borneo And the vineyards of Bordeaux
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Adding ALT TAG to text in HTML
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!!!
JackNorth to Alaska !
-
Oct 25, 2006, 06:11 #2
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
use the TITLE attribute instead
by the way, ALT is not a tag, it is an attribute of the IMG tag
-
Oct 25, 2006, 06:47 #3
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Oct 25, 2006, 07:17 #4
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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
-
Oct 30, 2006, 07:36 #5
- Join Date
- Nov 2004
- Location
- Wilds of Borneo And the vineyards of Bordeaux
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Adding ALt Tag text
Could you give me a short example of that coding?
Thanks,
JackNorth to Alaska !
-
Oct 30, 2006, 07:54 #6
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
<p title="this is a tooltip">this is the paragraph</p>
-
Oct 30, 2006, 08:16 #7
- Join Date
- Oct 2003
- Location
- Winona, MN USA
- Posts
- 10,053
- Mentioned
- 142 Post(s)
- Tagged
- 2 Thread(s)
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
-
Oct 30, 2006, 08:19 #8
- Join Date
- Nov 2004
- Location
- Wilds of Borneo And the vineyards of Bordeaux
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Adding ALt Tag text
Thanks to all for your help!
JackNorth to Alaska !
-
Oct 31, 2006, 00:36 #9
- Join Date
- Sep 2005
- Location
- Tanzania
- Posts
- 4,662
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
People get confused because IE shows the alt text as a tooltip when there is no title present. Which is wrong.
-
Nov 1, 2006, 09:43 #10
- Join Date
- Oct 2006
- Location
- United States of America
- Posts
- 44
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What do you mean by ALT tag, that's an image tag...
-----------------
Jeffrey Kevin Pry
-
Nov 1, 2006, 11:26 #11
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Lots of people say ALT tag when they mean ALT attribute.
Birnam wood is come to Dunsinane
Bookmarks