HTML and CSS Certification Practice Test

Question: 1 / 400

Which element is used to display an image while providing alternative text?

img

The correct choice is the 'img' element. The 'img' element in HTML is specifically designed to embed images in web pages, and it includes the ability to provide alternative text through the 'alt' attribute. This alternative text serves a crucial purpose as it provides a textual description of the image for accessibility purposes, such as screen readers used by visually impaired users. It also helps in instances where the image cannot be displayed, ensuring that the information conveyed by the image is still accessible to all users.

The 'picture' element, while useful for responsive images and allowing different sources for different screen sizes or resolutions, is not structured for directly displaying alternative text. The 'image' designation is not a valid HTML element, and 'div' is a generic container that does not serve the purpose of displaying images. Therefore, the 'img' element is the best choice for displaying an image while providing essential alternative text.

Get further explanation with Examzify DeepDiveBeta

picture

image

div

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy