How to prevent alt tags from appearing on mouseover?

admin

Administrator
Staff member
Could you please let me know: How to prevent alt tags from appearing on mouseover?<!--content-->have you tried to remove the content of the alternative text from the image tag?<br />
b/c you do not NEED to have anything inside the alt comment...<br />
<br />
old code:<br />
<img src=http://www.htmlforums.com/archive/index.php/"something.gif" alt="something"><br />
<br />
new code:<br />
<img src=http://www.htmlforums.com/archive/index.php/"something.gif" alt=""><br />
<br />
is this what you are looking for? <br />
<br />
john<!--content-->Yeah, just don't put any alt attribute in at all...<br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"image.gif" width="433" height="334"><br />
<br />
Good luck!<br />
<br />
P.S. I would encourage you to use ALT attributes whenever you can as it makes it much better for people with disabilities as the screen reader (?) they use will read out whatever the ALT of an image says.<!--content-->jog1973, JohnM<br />
<br />
Is there a script that allows to prevent alt tags from appearing on mouseover, even if I have added text within the alt?<!--content-->why do you want to do this?<br />
<br />
maybe use title="something" attribute instead? if this is for handicap access...otherwise, no , I have not seen a script that does this...<!--content-->I agree with jog!<br />
<br />
Why do you want to put alt tags and then block it off with a script? it just crosses each other out.<br />
<br />
I don't think there is a script that does that!<!--content-->Your alt tags aren't supposed to jump out at you like that. If they are, there is something wrong with the browser. Unfortunately the browser that has the most errors is also the most popular one, so I suppose you have to design for it's users. <br />
<br />
(Though "Best viewed in standards-compliant browsers" wouldn't sound half as idiotic as some such statements out there)<br />
<br />
In my browser the alt tags do not exist until I view source, or press G to turn off images. Then, if the text in the box says "Pamela Anderson naked", maybe I press G again.<br />
<br />
However, the solution is easy.<br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"mypic.jpg" alt="Whatever you want" title=""> It is the title attribute that is supposed to do what Microsoft is making the alt tags do.(Now you've got me saying it to. An alt tag would be <alt="something">, right?)<!--content-->it's not just MS IE that uses alt attributes in this way...netscape4.x does the same, in fact netscape.net uses alt attributes in this fashion. go figure.<br />
<br />
you are correct, though, in that title attributes are a way to display the title of an image...<br />
<br />
which browser are you using? opera? lynx?<br />
<br />
and the thing is, why does this person want to do this, anyway?<!--content-->Opera. I'm a bit embarrassed, I thought I had tested this in Netscape, but obviously did not. (forgot to reload, perhaps)<br />
<br />
I can understand why one would want to turn the yellow box up - information intended for the blind (or Opera-users with images off) may look silly when you already see the image.<!--content-->
 
Back
Top