On 3/18/06, <b class="gmail_sendername">Patrick R. Michaud</b> &lt;<a href="mailto:pmichaud@pobox.com">pmichaud@pobox.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
... is it important to make a distinction between alt= and title= in images?</blockquote><div><br>The HTML spec says alt= is mandatory and should be used in place of the image when the image cannot be displayed or the user has chosen not to display images.
<br></div><br></div>The title= attribute is optional and should be used to describe &quot;advisory information about the element for which it
is set&quot;<br><br>If I was to get pedantic about this I would say they should be used like this:<br><br>&lt;img src=&quot;pmwikilogo.gif&quot; alt=&quot;PmWiki logo&quot; title=&quot;This site is powered by PmWiki&quot;/&gt;
<br><br>The alt value should describe the image and the title attribute should describe the reason why the image is there.&nbsp; The obvious one to use for a tooltip is the title attribute and this is consistent with other elements.
<br><br>However, the alt attribute is *mandatory* and some browsers render as a tooltip anyway.<br><br>I just did a test of an image with both attributes.&nbsp; With image unavailable, both Firefox 1.5 and IE6 show an image placeholder with 'broken image' icon and the alternate text within the frame. There is a tooltip with the title text.&nbsp; With the image available, both display the image and use the title text for the tooltip.
<br><br>Remove the optional title attribute and the behaviours differ.&nbsp; Firefox does not have a tooltip, IE6 uses the alt text for a tooltip.&nbsp; This suggests that if the intent is a tooltip, then the title attribute should be used.
<br><br>So the only remaining question is do we need to offer both alt and title as distinct values?&nbsp; From a purist's point of view, yes.&nbsp; Pragmatically?&nbsp; Don't know.<br clear="all"><br>-- <br>Allister