alt="texthere" on links?

liunx

Guest
say you can do this do images <img src=http://www.htmlforums.com/archive/index.php/"hdfh.jpg" alt="Cool Pic"> and a little box comes up when u put mouse over pic and says Cool Pic.<br />
<br />
<br />
Can you do that with links? I have seen it before! does anyone know the code<!--content--><a href=http://www.htmlforums.com/archive/index.php/"#" title="this is a link...">lskdjfk</a><br />
<br />
<br />
*note, not all browsers support the title attribute of the a tag.<!--content-->The text of the title attribute popping up is the correct response. You use it with anchor <a> tags.<br />
<br />
<br />
The alt text of the <img> tag should not pop up, but many older browsers did pop it up. <br />
The alt text is only meant to be shown in place of the image if it fails to load, or if image loading is turned off, or of the page is being rendered by a non-visual browser.<!--content-->thank you dr.web it works. Thank you very much<!--content-->Originally posted by giz <br />
The text of the title attribute popping up is the correct response. You use it with anchor <a> tags.<br />
<br />
<br />
The alt text of the <img> tag should not pop up, but many older browsers did pop it up. <br />
The alt text is only meant to be shown in place of the image if it fails to load, or if image loading is turned off, or of the page is being rendered by a non-visual browser. <br />
<br />
you can do this:<br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"frog.gif" alt="picture of a frog" title="this is my pet frog"><br />
<br />
that way alt is satisfied and the title pops up on mouse over, works for form buttons too I believe.<!--content-->I believe that Google sees a title attribute directly on an <img> tag as an attempt at spamming the index.<br />
<br />
The title goes with <a> tag, and the alt goes with the <img> tag.<!--content-->Originally posted by giz <br />
I believe that Google sees a title attribute directly on an <img> tag as an attempt at spamming the index.<br />
<br />
The title goes with <a> tag, and the alt goes with the <img> tag. <br />
If that is true, then Google is doing a disservice to web designers. The "title" attribute is not just for links. In the case of images, the "alt" tag is just for alternate text if the image can not be displayed, while the "title" is to actually title the image. The "title" is what should be displayed as a tooltip, like Kevin said, not the "alt" text. DevEdge has a good short article on alt vs. title (<!-- m --><a class="postlink" href="http://devedge.netscape.com/viewsource/2002/tooltips/">http://devedge.netscape.com/viewsource/2002/tooltips/</a><!-- m -->).<!--content-->I just noticed that Google has a 'title' tag for their image today.<!--content-->Just a heads up, FF doesn't seem to display alt's, but does display title's. Maybe it is a good idea to have the title there just for backup if your alt text is important.<!--content-->The alt was never meant to be a tooltip, its meant to display image information if images can't be loaded. If you want the tooltip use title, you can use title on nearly any element.<!--content-->
 
Back
Top