The "label" element can be used to attach information (like a text label) to form controls.
Attributes for "label"
|'Standard' Attributes||"for" and "is"|
|New HTML5 Attributes||"form"|
|New HTML 5.2 Attributes||"slot"|
- Each "label" element should be associated with only one form control.
Accessibility Information & Tips
- For required form controls, indicate the required status in the control's "+'"label" or "legend". If not indicated by text (like "(required)"), then make sure the meaning of the indicator is explained before it is used. NOTE: Abbreviating "required" to "req." may be confusing. Visit https://www.w3.org/TR/WCAG20-TECHS/H90 for more information.
- In "select" elements, use "optgroup" to group related "option" elements. Label the option groups with the "label" attribute. Avoid using dummy list entries to delimit groups. Visit https://www.w3.org/TR/WCAG20-TECHS/H85 for more information.
Search Engine Links (for more information)