Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 619 Bytes

image-has-alt.md

File metadata and controls

29 lines (20 loc) · 619 Bytes

Image Has Alt

Rule Details

<img> should have an alt prop with meaningful text or an empty string for decorative images.

Resources

Examples

Incorrect code for this rule 👎

<img src="logo.png">

Correct code for this rule 👍

<!-- good -->
<img alt="" src="logo.png" >
<!-- also good -->
<a href='https://github.com/'><img alt="GitHub homepage" src="logo.png" ></a>