开发者

Image without caption

开发者 https://www.devze.com 2023-02-09 21:17 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消