Image alt attribute best practices

后端 未结 10 1084
既然无缘
既然无缘 2020-12-20 16:51

What exactly is the intended use of the alt attribute on tags?

Should it describe the image, or should it provide meaningful re

10条回答
  •  醉梦人生
    2020-12-20 17:17

    I think the idea is to use the alt text to communicate the same information as was intended with the image. This depends on what the image is.

    Navigational elements are perhaps better described by their function ("next page", "back") than their appearance ("right arrow").

    The photo of John Smith might be replaced with a description of John Smith, or a description of the event taking place, etc.

提交回复
热议问题