What is the main purpose of the alt attribute on an <img> element?
Correct answer
C. To describe the image for screen readers
19 views
C. To describe the image for screen readers
19 views
alt text is read aloud by screen readers and is shown if the image fails to load. Search engines also use it to understand images, which supports SEO.
Asked in: NTS, PPSC, Web Developer Interviews
Not sure why the answer is C? Ask here and get an explanation.