Back to Unit 6

Unit 6 Website Development - Tutorial 1

1.10 Add meaningful alt text to images

Continue the same static website project by making images understandable for all users.

Why Alt Text Matters

Alt text is a short description of an image. It is written in the alt attribute of the <img> element.

Screen readers can read alt text aloud, and browsers can show it if an image does not load. Good alt text helps make your static website more accessible.

Good Example

<img src="images/coding-club.jpg" alt="Students working together at a coding club">

This describes the important information in the image.

Weak And Strong Alt Text

Weak alt text Better alt text
alt="image" alt="Laptop showing HTML code"
alt="photo" alt="School building entrance"
alt="logo" alt="School coding club logo"

Build It Yourself

  1. Open the same index.html file from the previous image task.
  2. Find your <img> element.
  3. Add or improve the alt attribute.
  4. Describe the meaning of the image, not just the file name.
  5. If you add an image to about.html or contact.html, give that image meaningful alt text too.

Common Mistakes

Success Checklist