/    Sign up×
Community /Pin to ProfileBookmark

Adding ALT TAG to text in HTML

[B][I][COLOR=Blue]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[/COLOR][/I][/B] ?

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@TheBearMayOct 25.2006 — [code=html]Random text <span alt="Alt tag description">Text for alt tag association</alt> More text....[/code]
Copy linkTweet thisAlerts:
@the_treeOct 25.2006 — Okay, you do realise that will be of no use to anyone right? I suspect porterhouse is confusing alt attributes (there is no such thing as an alt tag) with title attributes, a mistake inspired by IEs tooltip use of alt tags which is quite incorrect and misleading to begining developers.

[code=html]<img alt="alternate text" title="summary text" src="source file">
<p title="summary text">Full text</p>[/code]
Copy linkTweet thisAlerts:
@porterhouseauthorOct 25.2006 — Can I send you the code in question?
Copy linkTweet thisAlerts:
@felgallOct 25.2006 — The alt attribute is to supply alternate text for when an image can't be displayed. As there is no point in having alternate text to display when a piece of text can't display the alt attribute only applies to images. Internet Explorer contains a bug where if an image has alt text and no title text then the title attribute of the image is assumed to contain the same content as the alt attribute. The title attribute is used to display the contained text as a tooltip when the mouse hovers over the object that the title belongs to.

<img src="myimage.gif" alt="text to display if you can't see the image"

title="Text to display when the mouse moves over the image">

<span title="text to display when the mouse moves over the following text">hello</span>

You can fix the bug in IE by always supplying a title attribute in your images.

<img src="myimage.gif" alt="text to display if you can't see the image" title="">
Copy linkTweet thisAlerts:
@porterhouseauthorOct 30.2006 — [B][I][COLOR=Red]Many thanks to all for your help!!![/COLOR][/I][/B] ? ? ?
×

Success!

Help @porterhouse spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...