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">
// Usingfor
attribute
Parameters
Attributes | Description |
——— | —–– |
for | Reference to the target ID Element. I.e: for="surname"
form | HTML5, [Obsolete] Reference to the form containing the Target Element. Label elements are expected within a <form>
Element. If the form="someFormId"
is provided this allows you to place the Label anywhere in the document.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents