Image without caption
I read that in XHTML, one has to put alt-attributes to images to get a valid img-tags. But then I saw a small rectangular area as I moved my mouse over the image. Can I make an image tag which passes validatio开发者_Go百科n but it won't show that rectangle as I move mouse over the image?
Use a blank alt
(IE) and do not specify the title
attribute (other browsers):
<img src="myimage.png" alt="" />
The spec says you need to include the alt
attribute; however it may be blank as long as you put it there.
精彩评论