♿Alt Text
Also known as Alternative Text, Image Description, Alt Attribute
A few words that say what a picture shows. It is for people who cannot see it.
Think of it like
It is like telling a friend on the phone what a photo shows. You say what matters in it.
Example
Instead of alt="chart", Lucy writes: sales doubled from March to June. A screen reader user gets the point.
Why it matters
Without it, a blind user hears just image, or a file name. They miss the point.
Definition
Example code
html
<img src="dog.jpg" alt="A brown dog catching a ball in the park">
<img src="swirl.png" alt="">Common mistake
Key takeaways
- 1Say what it means. In this place.
- 2Short. A sentence or so.
- 3Empty for decoration. alt="" skips it.