What is good alt text to use?

I think I have done what this task requires me to do, but I can’t see the Alternative text coming out. Is this normal or shall I be able to see the text? Thank you very much!

Alternate text only displays while waiting for the image to download. Then it is hidden. MS browsers can see the text on mouseover (as a tooltip) but others do not (afaik). For those browsers we would put in an additional attribute, title="" which text will display as a tooltip in all browsers.

10 Likes

Thank you very much!

1 Like

why doesn’t my alt image text show on the screen?

See the post above… ALT text does not display on mouseover in most browsers, only IE as far as I know. Edge may be different.

2 Likes

excellent man! keep it up

3 Likes

In short I can say that, they are useful when the picture doesn’t load due to certain issues!
Instead of blank space in front of you, an alternative text would atleast give you some information about the content.

I’d like to show another example for ease.

HAPPY CODING!

2 Likes

Can the “src” and “alt” image attributes be used in the same paragraph/line?

They are both meant to be used inside an img tag.

<img src="#" alt="short description of image">

I wrote “Brown bear infront of forest staring.”
is that too descriptive? yours is more vague

That is sooo cool!! :nerd:

5 posts were split to a new topic: Discussion with Discobot

I put “Brown Bear Mug Shot” for mine :slight_smile:

Hmm…that does sound like a good alt text for that image! :wink:

1 Like

Now close your eyes and imagine the computer reading that to you. How good is it really? Alternate text is not a joke, and should never be treated lightly. It’s not just an appendage that can be ignored or brushed aside. The text should briefly describe the picture. We don’t take mug shots of bears, and neither might an unsighted or challenged user even know what one is.

3 Likes

Oh, okay. Thanks for telling me that.

2 Likes

Didn’t mean to come down so hard on you. Still, it is what it is. Give serious consideration to the semantic and usability side of web development, as you go. Study validation along the way, every step. Learn what an accessible site really is and you will go far.

4 Likes

I want to ask the same question!

Alternate text is not meant to display. The user agent reads it. In assistive technologies the user may have a screen reader, and depending on their settings, the text is read to them.

HTML5 introduced the <figure /> element with its accompanying <figcaption /> element.

<figure>
  <img src="" alt="text for screen reader">
  <figcaption>Text for all users</figcaption>
</figure>

It’s not vague. It’s what it is.