HTML and CSS Certification Practice Test

Question: 1 / 400

Which attribute of the <img> tag is essential for accessibility?

src

alt

The attribute that is essential for accessibility in the `<img>` tag is the `alt` attribute. This attribute provides alternative text for the image, which is crucial for users who rely on screen readers. When images cannot be displayed or if a user has visual impairments, the `alt` text describes what the image is about, allowing users to understand the content and context of the image without actually seeing it.

Having descriptive and concise `alt` text improves the website's accessibility, ensuring that all users, regardless of their abilities, can engage with the content fully. It also enhances SEO by providing search engines with information about the image, which can help in indexing and ranking content.

Other attributes like `src` specify the image source, while `width` and `height` define its dimensions. While these attributes are important for displaying images properly, they do not contribute to making the content accessible to users with disabilities in the same way that the `alt` attribute does. Therefore, `alt` fundamentally serves the purpose of making visual content accessible, making it the correct choice for this question.

Get further explanation with Examzify DeepDiveBeta

width

height

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy