HTML and CSS Reference
In-Depth Information
form="
id of the form owner
id of the form owner
"
Explicitly associates the
label
element with its associated form (its
form owner
). With
this method, the label does not need to be the child of the applicable
form
element.
Examples
Form control and its labeling text contained within the
label
element:
<label>
Last Name: <input type="text" size="32">
</label>
Using the
for/id
method to associate the form control with its labeling text:
<label for="lastname">
Last Name:
</label>
<input type="text"
id="lastname"
size="32">