16 lines
707 B
Plaintext
16 lines
707 B
Plaintext
The HTML <label> Element represents a caption for an item in a user interface. It can be associated with a control either by placing the control element inside the label element, or by using the for attribute. Such a control is called the labeled control of the label element.
|
||
|
||
Content categories:
|
||
Flow content, phrasing content, interactive content, form-associated element, palpable content.
|
||
|
||
Permitted content:
|
||
Phrasing content, but no descendant label elements. No labelable elements other than the labeled control are allowed.
|
||
|
||
Tag omission:
|
||
None, both the starting and ending tag are mandatory.
|
||
|
||
Permitted parent elements:
|
||
Any element that accepts phrasing content.
|
||
|
||
DOM interface:
|
||
HTMLLabelElement |