Is using the logo tag in sprites good or bad?

后端 未结 14 630
攒了一身酷
攒了一身酷 2021-02-05 05:31

When building web pages, one of my colleagues displays any logo using the CSS background-image property, rather than embedding the image using an HTML t

14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 05:48

    A logo is part of the content of your site, therefore it should be in an img tag, not as a background image. It will help to increase SEO (adding a title and alt attribute will too) and the reason companies like Google, Facebook, et al put their image in a sprite is for load times - not SEO enhancement.

    Does your company have the same SE rank as Google or Facebook? No. Until then, keep putting the logo in an img tag where it belongs. When your site is consistently the most viewed site on the internet, then you can start thinking about performance more than SEO.

    Also, as an aside, if the logo ever had a tweak (size, color, etc), the sprite would have to be recreated as well as the CSS. If it was just an img tag, this hassle is nonexistent.

提交回复
热议问题