Language References
Specifies a label for a form control. | HTML 4, 4.01, 5 |
HTML Syntax
<label
accesskey = key
class = classname
datafld = colname
dataformatas = html | text
datasrc = #id
for = id
id = value
style = css properties
title = text
event = script
>
Some form controls automatically have labels associated with them [push buttons], while most do not [text fields, checkboxes, radio buttons and menus].
For those controls that have implicit labels, browsers use the value of the value attribute as the label string.
The LABEL element is used to specify labels for controls that do not have implicit labels.
If the user clicks the label with the mouse, the onclick event goes to the label and then bubbles to the control specified by the htmlFor property. Pressing the accesskey for the label is the same as clicking the mouse on the label.
Labels cannot be nested.
LABEL Members
accessKey