HTML Bug Hunt Easy +10 XP
Label Not Linked
Clicking the label doesn't focus the input.
HTMLFind the bug
1
<label>Name</label>2
<input type="text" id="name"> The bug is on line 1
Select the correct fix
Show answer and explanation
Answer: Both A and C work
Labels link to inputs either via for='id' matching, or by wrapping the input element directly inside the label.
Hint: How does a label know which input it belongs to?
What this challenge tests
Bug Hunt in HTML: forms, accessibility, labels.