How is a <label> correctly linked to an input with id="email"?
Correct answer
B. <label for="email">
17 views
B. <label for="email">
17 views
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.
Asked in: NTS, Web Developer Interviews
Not sure why the answer is B? Ask here and get an explanation.