Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Monk images at the top of the page (it's an attribute, not a tag)

by Wysardry (Pilgrim)
on Jan 24, 2003 at 03:43 UTC ( [id://229528]=note: print w/replies, xml ) Need Help??


in reply to Re: Monk images at the top of the page (it's an attribute, not a tag)
in thread Monk images at the top of the page

IE handles the ALT and TITLE attributes more sensibly than you might think.

It displays the ALT text (if available) when you hover your mouse over it only if there isn't a TITLE attribute defined (even an empty one).

Try this code:-

<HTML> <HEAD> <TITLE>Image Attribute Test</TITLE> </HEAD> <BODY> <P> <IMG WIDTH="50" HEIGHT="50" SRC="img.gif" ALT="Alt" TITLE="Title"><BR> <IMG WIDTH="50" HEIGHT="50" SRC="img.gif" ALT="" TITLE="Title"><BR> <IMG WIDTH="50" HEIGHT="50" SRC="img.gif" ALT="Alt" TITLE=""><BR> <IMG WIDTH="50" HEIGHT="50" SRC="img.gif" TITLE="Title"><BR> <IMG WIDTH="50" HEIGHT="50" SRC="img.gif" ALT="Alt"><BR> <IMG WIDTH="50" HEIGHT="50" SRC="img.gif"> </P> </BODY> </HTML>

It helps if img.gif doesn't exist as it makes it more obvious what happens with the ALT text.

__________
"Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work." -- (Author Unknown)

  • Comment on Re: Re: Monk images at the top of the page (it's an attribute, not a tag)
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Monk images at the top of the page (it's an attribute, not a tag)
by castaway (Parson) on Jan 24, 2003 at 10:06 UTC
    Its debateable if 'sensible' and 'according to standard' are interchangeable, in my opinion, if it was good, it would be like that in the standard anyway. ;)
    As far as I understand it, the ALT text should be shown in the page where the image would be, if it was there/shown. And the TITLE tag is for the mouse.

    Anyfish, thanks for the positive feedback, *waits to see what happens*

    C.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://229528]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-26 08:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found