1. Home
  2. Computer Science MCQs
  3. HTML
  4. How is a correctly linked to an input with id="email"?

Added 2 Nov 2026

How is a <label> correctly linked to an input with id="email"?

  1. <label id="email">
  2. <label for="email"> Correct answer
  3. <label href="email">
  4. <label name="email">

Correct answer

B. <label for="email">

17 views

MCQSEXAM

Explanation

The for attribute must match the input's id. Clicking the label then focuses the field, and screen readers announce it, which improves both usability and accessibility.

Reference

Asked in: NTS, Web Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More HTML MCQs

Practise all HTML MCQs

Similar MCQs