I'm on the fence about coding about 8 social media icons on a site as either img tags or anchors with CSS background images that use sprites.
I wish I could do a poll here, but I'm interested in hearing from you all what you think is best and why?
I'm on the fence about coding about 8 social media icons on a site as either img tags or anchors with CSS background images that use sprites.
I wish I could do a poll here, but I'm interested in hearing from you all what you think is best and why?
Here's a link that addresses when it is best to use img tags versus CSS background images that use sprites: When to use IMG vs. CSS background-image?
It specifically gives the instances when CSS with sprites are better, because CSS with sprites
The link I gave provides a much more complete answer (my two points were off the top of my head, I bookmarked the link above and often use it for reference).
I think, in terms of my preference, I like to use sprites. Primarily because you can put all your icons in one image file, css-move the background image to the location(s) and then the user only has to download (cache) the one file. This means less requests on your server, less files to wait for AND you can preload just the one file. And updating is easier, IMO.
Hope this helps.