diffsnack
HTML Find the mistake Level 4

HTML exercise: Images: alt, width and height — Find the bug.

Screen reader users should hear what the album cover shows.

The exercise

Find the bug.

1<a href="nemesis.html">
2 <img src="nemesis.webp" width="600"
3 height="600" loading="lazy">
4 <h3>Nemesis</h3>
5 <p>Band A</p>
6</a>

Solution

The bug is in line 2.

- <img src="nemesis.webp" width="600"
+ <img src="nemesis.webp"
+ alt="Album cover Nemesis" width="600"

This <img> has no alt attribute, so screen readers may read the file name or say nothing useful. A short alt like "Album cover Nemesis" describes the image when it cannot be seen.

Play this exercise Learn the concept: Images: alt, width and height