0
0
HTMLmarkup~5 mins

Alt text for images in HTML - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is alt text in an image tag?

alt text is a short description of an image used in HTML to help people who cannot see the image understand what it shows.

Click to reveal answer
beginner
Why is alt text important for web accessibility?

It helps screen readers describe images to users who are blind or have low vision, making the web more inclusive.

Click to reveal answer
beginner
How do you add alt text to an image in HTML?

Use the alt attribute inside the <img> tag, like this: <img src="photo.jpg" alt="A smiling dog">.

Click to reveal answer
beginner
What should you write in alt text?

Write a clear, simple description of the image’s content or purpose. Avoid phrases like "image of" or "picture of".

Click to reveal answer
intermediate
When should alt text be left empty (alt="")?

When the image is purely decorative and does not add meaning, leaving alt="" tells screen readers to skip it.

Click to reveal answer
What does the alt attribute do in an <img> tag?
ALinks the image to another page
BProvides a text description of the image
CAdds a border around the image
DChanges the image size
Which is a good example of alt text for a photo of a red apple?
A"Fruit"
B"Image of a red apple"
C"Red apple on a wooden table"
D"Picture"
When should you use alt="" (empty alt text)?
AFor decorative images
BFor images with text
CFor important images
DNever use empty alt text
What happens if you forget to add alt text to an image?
AThe image will be clickable
BThe image won’t show
CThe page will load faster
DScreen readers may read the image file name, which can be confusing
Which HTML is correct for an image with alt text?
A&lt;img src="dog.jpg" alt="A happy dog"&gt;
B&lt;img alt="A happy dog" src="dog.jpg"&gt;
C&lt;img src="dog.jpg"&gt;
D&lt;img alt&gt;A happy dog&lt;/img&gt;
Explain why alt text is important for images on websites.
Think about users who cannot see images.
You got /4 concepts.
    Describe how to write good alt text for an image.
    Imagine explaining the image to a friend who can’t see it.
    You got /4 concepts.