Skip to content
Clairos Learn

Links and media · Lesson 4 of 8 · 10 minutes

Links and media: Images with useful alt text

Alternative text communicates the relevant content of an informative image. Purely decorative images use empty alt text.

Mastery 0/3Run itExplain itApply it
Web workshopInert preview · code inspection

Current edit

PreviewNo external resources

Understand the pattern

Alternative text communicates the relevant content of an informative image. Purely decorative images use empty alt text.

Alternative text communicates the relevant content of an informative image. Purely decorative images use empty alt text.

Misconceptions to reject

  • A visual appearance alone guarantees the intended HTML meaning.
  • Replacing semantic elements with generic divs automatically improves accessibility.

The preview is a sanitized subset, not a full browser compatibility test.

Worked example and expected result
<img src="workshop.jpg" alt="Learners comparing terminal output at a desk" width="640" height="480">
<img src="divider.svg" alt="">

Alternative text communicates the relevant content of an informative image. Purely decorative images use empty alt text.

Try a variation

Adapt the final example to a different project name while retaining its structure and relationships. A different context still needs a real browser and accessibility check.

Explain it

Which statement correctly explains images with useful alt text?

Apply it elsewhere

You reuse images with useful alt text in a different project. What must still be verified?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Links and media: Figures and captionsTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Links and media: Current-page navigationaria-current="page" identifies the active page within navigation without making the link disappear.Practice
  2. 02Links and media: Figures and captionsfigure groups a self-contained image with a figcaption that provides visible context.Practice
  3. 03Links and media: Responsive image dimensionsIntrinsic width and height let the browser reserve the image aspect ratio before loading the asset.Practice