Rules / image rules

image.alt.content.html

Default
error
Plugin
image

The alt text has no HTML tags.

Why: alt holds plain text. Tags in it are read out as literal text.

Only the tags of HTML elements, comments, and declarations count. alt text can name a tag that no HTML element has, such as <my-element>.

When off: alt text with tags passes.

<!-- ✗ Fails -->
<img src="/bread.jpg" alt="&lt;b&gt;Bread&lt;/b&gt;" />

<!-- ✓ Passes -->
<img src="/bread.jpg" alt="Bread" />

References