Originally posted by Sage
Code:[b]<img src="[/b][i]relative or absolute URL to image[/i][b]" height="[/b][i]h[/i][b]" width="[/b][i]w[/i][b]" alt="[/b][i]alternate text for those using screenreaders[/i][b]" />[/b]
Uh, I thought width and height were illegal in XHTML? alt also displays a tooltip when you hover over the image.Originally posted by Sage
Code:[b]<img src="[/b][i]relative or absolute URL to image[/i][b]" height="[/b][i]h[/i][b]" width="[/b][i]w[/i][b]" alt="[/b][i]alternate text for those using screenreaders[/i][b]" />[/b]
For everything else but images. In fact, I believe the W3C recommends that one always puts the dimensions within an image tag, so that the browser doesn't have to calculate it.Originally posted by Shannon
Uh, I thought width and height were illegal in XHTML?
Only IE/win (and maybe the Gecko browsers) do that though. If you want a "real" tooltip, then you put in the title attribute.alt also displays a tooltip when you hover over the image.
I could've sworn the validator spew out an error when I added width and height to an img tag once.Originally posted by Sage
For everything else but images. In fact, I believe the W3C recommends that one always puts the dimensions within an image tag, so that the browser doesn't have to calculate it.