Label Element
suggest changeSyntax
<label>Example <input type="radio" name="r"></label>// Wrapping a control Element<label for="rad1">Example</label> <input id="rad1" type="radio" name="r">// Usingforattribute
Parameters
| Attribute | Description |
|---|---|
for |
The id of the labeled control, for example for="surname". |
form |
HTML5. The id of the <form> this label belongs to. The attribute is not obsolete. If form="someFormId" is set, the label can be placed outside that form. |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents