Images and Alternative Text


Images are an important part of web content, but not all users can see them.

Alternative text helps describe images for users who rely on screen readers.

What Is Alternative Text

Alternative text, often called alt text, provides a written description of an image.

Screen readers read this text aloud to visually impaired users.

Why Alt Text Is Important

Alt text ensures that information in images is not lost.

It also improves accessibility, SEO, and user experience.

Without alt text, screen readers cannot describe the image to the user.

Now screen readers can explain what the image shows.

Writing Good Alt Text

Good alt text should:

  • Be short and clear
  • Describe the purpose of the image
  • Avoid unnecessary words

Decorative Images

Images that are only decorative should have empty alt text.

This tells screen readers to skip the image.

Functional Images

If an image is clickable or has a function, the alt text should describe the action.

Common Alt Text Mistakes

  • Leaving alt text empty for important images
  • Writing very long descriptions
  • Using file names as alt text

Why Alt Text Matters for Jobs

Accessibility is a professional standard.

Employers expect developers to write proper alt text.

Practice Task

Add alt text to all images on a webpage. Decide which images are decorative and which are meaningful.

What You Will Learn Next

In the next lesson, you will learn how to make forms accessible using proper labels.