html - Using sprites with IMG tag? -


i understand how use sprites, however, isn't "src" attribute required img tags? use span or other tag , set background/width/etc won't semantically correct.

basically, i'd omit src img tag , use sprites, concerned html not being technically valid because of it. thanks.

about semantical correctness:

when image has semantical meaning, considered content, use img tag, without sprites, , correctly set alt.

when image decoration, background of box, background of button, background of menu option, etc., has no semantical meaning, can use background of span, div, etc. css. can use sprites in case.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -