Images (img, src, alt)
An attribute on <img> that provides a text description of the image, shown when the image fails to load and read aloud by screen readers for accessibility.
Understanding Images (img, src, alt) in HTML & CSS
What it does: alt="Company logo" describes the image. Screen readers announce this text to visually impaired users. src="banner.jpg" tells the browser which file to load. alt="Banner" describes it for accessibility. <img> is self-closing. It has no content and no closing tag - adding </img> is invalid HTML. src provides the image path on <img>. href is used on <a> elements for link destinations. alt is an accessibility attribute. It is not a visible caption - use <figcaption> inside <figure> for a visible caption. alt must always be present. Omitting it is an accessibility failure. For decorative images with no meaning, use alt="". The second option is missing the required alt attribute. Both src and alt must be present on every <img>.
Common mistakes: The <img> tag is missing the required alt attribute. Always include alt="description" for accessibility and fallback text. The alt value must be enclosed in double quotes: alt="Hero banner", not alt=Hero banner without quotes.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 11–21) and word search (Modules 1–23).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
altFill in the Blanks
Spot the Error
Student with a class code? Join your class →