Alt attribute will not show text when mouse is over image


#1

O.K. I a trying to add the alt attribute to the img element.

The example to me is a little confusing it shows an img src name set to # and an alt value of a field of yellow flowers. I am assuming that to add the alt attribute to this image I just place the alt value at the end of the img element. I am assuming that because the src value is already named with the url that I do not need the src="#" value in my code.

What have I missed in this exercies?


<img src="https://s3.amazonaws.com/codecademy-content/courses/web-101/web101-image_brownbear.jpg" alt="That's a big bear"/>


#2

it's not good to use alt attribute as a tooltip use title instead.

it'll only work in internet explorer 7 or earlier version as a tooltip when mousing over the image.

For more information see here and here


#3

Thanks RC, I finally found a youtube video that showed me another example. If you mis-name your image it shows your alt text where the image would be. I get it now. Thanks for the quick reply.


#4