Adding Alt Text to Images for Accessibility
📖 Scenario: You are creating a simple webpage for a local bakery. The page will show pictures of their best-selling cakes. To make sure everyone can understand the images, including people who use screen readers, you need to add descriptive alternative text to each image.
🎯 Goal: Build a basic HTML page with three images of cakes. Add meaningful alt text to each image so that people who cannot see the pictures can still know what they show.
📋 What You'll Learn
Create an HTML5 page with a
<main> sectionAdd three
<img> tags inside the <main> sectionUse the exact image file names:
chocolate-cake.jpg, vanilla-cupcake.jpg, strawberry-tart.jpgAdd descriptive
alt attributes to each <img> tagUse semantic HTML and include a
<header> with a page title💡 Why This Matters
🌍 Real World
Adding alt text to images is essential for making websites accessible to people who use screen readers or have slow internet connections where images might not load.
💼 Career
Web developers must ensure their websites meet accessibility standards, which includes providing meaningful alt text for images to improve usability for all users.
Progress0 / 4 steps