<label> liên kết mô tả với form control theo 2 cách: dùng for khớp với id của input (<label for="email">Email</label><input id="email">), hoặc wrapping trực tiếp.
- Click vào label = focus/check input — tăng click area đáng kể trên mobile.
- Screen readers đọc label khi user focus vào input.
- Lỗi phổ biến: chỉ dùng placeholder thay label — placeholder biến mất khi gõ, không accessible.
- Placeholder nên là gợi ý, không phải label.
<label> associates a description with a form control in two ways: using for matching an input's id (<label for="email">Email</label><input id="email">), or by wrapping the input directly.
- Clicking the label focuses or checks the input — significantly increasing the tap target on mobile.
- Screen readers read the label when the user focuses on the input.
- Common mistake: using only a placeholder instead of a label — placeholder disappears when typing and is not accessible.
- Placeholder should be a hint, not a label replacement.