Image alt attribute
- Alt text describes the content of the image and provices a text-alternative.
- Good
alt
text is short but descriptive, and meant to briefly convey the meaning of the image. - For images, screen readers can access the
alt
attribute and read its contents to deliver key information. - Per HTML5 specification, this is now considered mandatory.
alt
can be set to an empty string when images are grouped with a caption already describing them, or are used for decoration only.
<img src="visualDecoration.jpeg" alt="">
参考资料: