Skip to main content
InterviewHubPRO
Section Overview
Q11

Question 11 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

22%
Web Accessibility & WCAG (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

How do you make images accessible with the `alt` attribute?

junior LevelCode ExampleDocker & Containers

In Simple Words:

  • Informative Images: Provide concise, descriptive text explaining the meaning and context:
    html
    <img src="chart.png" alt="Bar chart showing 25% revenue growth in Q3 2026." />
    
  • Decorative Images: Use an explicit empty alt tag (alt=""):
    html
    <!-- Empty alt tells screen readers to IGNORE the image completely -->
    <img src="decorative-swirl.png" alt="" />
    
    Warning: Omitting the alt attribute entirely causes screen readers to announce the raw file URL (image-assets-final-v2.png), creating awful user experience!