forattribuut
Forattribuut, in HTML commonly referred to as the for attribute, is an attribute used on label elements to bind the label to a form control. Its value must be the id of a form element such as input, select, or textarea. When the label’s for attribute matches a control’s id, clicking the label focuses or activates that control, which improves usability and accessibility.
Example: <label for="email">Email address</label> <input id="email" type="email" />
Important constraints include that the id must be unique within the document. The for attribute works best
Accessibility considerations are central to the for attribute. It helps screen readers associate the visible label
Compatibility and standards: the for attribute on label elements has been part of HTML since HTML4 and