HTML form labels: W3C WAI implementation guidance. This chapter does not cover validation, error recovery or legal compliance.
Question 2 / 4
Use a label element with a for attribute that exactly matches the input's id. WAI recommends this explicit association whenever possible. Clicking the associated label also gives users a larger area for activating the control. [2]
Try the label, then the field
An explicit association
The visible label names the field before anything is typed. The placeholder is an example, not the field name. Keyboard focus and browser validation are real, not a pictured mockup.
This is an original summary, not a translation of the full tutorial. The Korean and English pages are translations of this GenFAQ summary. No W3C review, affiliation or certification is claimed.