Skip to content

Files

Latest commit

703a088 · Apr 3, 2023

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>