HTML
Example
Two radio buttons with labels:
Try it »
Browser support





All major browsers support the for attribute.
Definition and Usage
The for attribute specifies which form element a label is bound to.
Differences between HTML 4.01 and HTML5
none.
Syntax
Attribute values
| Value | Description |
|---|---|
| element_id | The id of the element that the label is bound to. |
HTML