HTML · Question 9 of 12

What is the alt attribute of an image for?

1 answer is correct. Medium

Show answer

Answer

  • A It replaces the image with text, e.g. for screen readers

Explanation

alt provides a text replacement if the image cannot be seen or loaded. This is important for accessibility.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications