Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

<img> tags, used to include images on a document, require an alt attribute to describe the contents of the image. This is essential for users that cannot see the image (like screen reader users), or as an alternate text when the image cannot be displayed. Example:

<img src="photo.jpg" alt="Person holding a cat" />

Related W3C validator issues