nerdexam
CIW

1D0-610 · Question #75

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 because HTML5 mandates it for accessibility - it provides alternative text for screen readers and displays when an image fails to load. The W3C HTML5 validator will flag an <img> tag as an error if alt is missing, even if the…

CIW Site Development Associate

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

(55 responses)
  • A
    4% (2)
  • B
    93% (51)
  • C
    2% (1)
  • D
    2% (1)

Explanation

The alt attribute is required on <img> elements because HTML5 mandates it for accessibility - it provides alternative text for screen readers and displays when an image fails to load. The W3C HTML5 validator will flag an <img> tag as an error if alt is missing, even if the value is an empty string (alt="").

The distractors are all optional attributes: id is a global attribute used for targeting elements with CSS/JS but has no validation requirement; name is largely obsolete on <img> tags (it was used in older HTML); title provides a tooltip on hover but is purely optional and has no effect on validation.

Memory tip: Think "ALT = ALways There" - the alt attribute must always be present on images for both accessibility compliance and valid HTML5.

Topics

#HTML5 validation#img tag#alt attribute#accessibility

Community Discussion

No community discussion yet for this question.

Full 1D0-610 Practice