Jump to content

alt="txt"


walterwj12

Recommended Posts

For a beginner I must say that this is one of the best way to learn.

 

I thought I would make this post as I was caught for quite a while using alt="txt" and the hover did not work.

 

Found a lot of other people on internet having the same problem.

 

I use Mozilla browser and this browser does not display the hover, if you use Internet Explorer it works fine.

Link to comment
Share on other sites

The alt tag is not meant to display the text on hover, the alt tag is there to provide information about the image for those who cannot see the image. IE just does its own thing - as usual.

 

Per W3S- http://www.w3schools.com/tags/att_img_alt.asp

 

Definition and Usage

The required alt attribute specifies an alternate text for an image, if the image cannot be displayed.

 

The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).

 

Note: Some older browsers display the value of the alt attribute as a tooltip when mousing over the img element. This is NOT the correct behavior, according to the HTML specification.

 

Link to comment
Share on other sites

The alt tag is not meant to display the text on hover, the alt tag is there to provide information about the image for those who cannot see the image. IE just does its own thing - as usual.

 

Per W3S- http://www.w3schools.com/tags/att_img_alt.asp

 

Yes technically you are right.

However when U are doing a course and things dont happen as per the instructors illustrations then one

tends to think that you have a problem or created a problem.

 

So having researched I decided to share my findings so that other newbies dont get stuck like me.

 

Tks

Link to comment
Share on other sites

As Andrea says, the alt is not there as a tooltip. It's there to provide information if the image doesn't load. IE incorrectly displays a tooltip.

 

If you want a tooltip, use title="..." and you must keep the alt

<img src="image.jpg" alt="Image description" title="Image decription" />

Link to comment
Share on other sites

However when U are doing a course and things dont happen as per the instructors illustrations then one

tends to think that you have a problem or created a problem.

 

So having researched I decided to share my findings so that other newbies dont get stuck like me.

I'd mention it to the instructor - nothing wrong with teaching the teacher and keeping him/her from repeating the misinformation to the next class.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...