nerdexam
CIW

1D0-61B · Question #16

Which <1mg> tag attribute is required in order for HTML5 documents to validate without error?

The correct answer is B. alt. The alt attribute is required on <img> elements for HTML5 validation because it provides alternative text that describes the image when it cannot be displayed, and is essential for screen readers and accessibility compliance - HTML5 validators will flag its absence as an error…

HTML5 Coding

Question

Which <1mg> tag attribute is required in order for HTML5 documents to validate without error?

Options

  • Aid
  • Balt
  • Cname
  • Dtitle

How the community answered

(43 responses)
  • A
    7% (3)
  • B
    86% (37)
  • C
    2% (1)
  • D
    5% (2)

Explanation

The alt attribute is required on <img> elements for HTML5 validation because it provides alternative text that describes the image when it cannot be displayed, and is essential for screen readers and accessibility compliance - HTML5 validators will flag its absence as an error.

The other options are all optional attributes: id is a global attribute used for targeting elements with CSS/JS but is never required; name is a legacy attribute largely replaced by id and not required on images; title provides supplemental tooltip text but is purely optional and not enforced by the HTML5 spec.

Memory tip: Think "alt = always" - the alt attribute must always be present on every <img> tag, even if its value is empty (alt="") for decorative images.

Topics

#HTML5 validation#img element#alt attribute#accessibility

Community Discussion

No community discussion yet for this question.

Full 1D0-61B Practice