开发者

Better add images through html or css?

开发者 https://www.devze.com 2023-03-19 10:20 出处:网络
Better add images through HTML and determine alt tags, or add through CSS with the text-indent: -9999px (or similar) property? Or is there no difference?

Better add images through HTML and determine alt tags, or add through CSS with the text-indent: -9999px (or similar) property? Or is there no difference?

Does search engines take text-indent: -9999px property as a normal way of doing things? Cause with this property we actually create a text, but not showing it for t开发者_运维技巧he user.


I'd say it depends on what you're trying to make it mean. Is it an image with text fallback, or is it text with an image enhancement?

If I have an image which is just a fancier version of the text (perhaps with special effects or flourishes), I use the text with background-image and negative text-indent. If I have an image where the text does not convey the full meaning, I use <img alt>.

0

精彩评论

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