Question: 1 / 50

What HTML attribute describes the alternative text for an image?

title

alt

The attribute that describes the alternative text for an image is the alt attribute. This attribute provides a textual description of the image, which is important for several reasons. First, it improves accessibility. Screen readers use the alt text to convey information about the image to visually impaired users. If an image cannot be displayed for some reason (like a slow internet connection or a broken link), the alt text will be shown in its place, offering context about what the image represents. Second, search engines utilize this attribute to understand the content of an image, which can contribute to SEO (Search Engine Optimization). Well-written alt text can help more accurately index the webpage and can improve overall visibility in search results. The other options, while they may seem relevant, do not serve this particular function. The title attribute, for instance, is intended to provide additional information when an element is hovered over, but it does not replace the alternative text provided by the alt attribute. The desc attribute is not a standard HTML attribute for images, and label does not describe an image; it is often used with form elements to define a label for an input field.

desc

label

Next

Report this question