HTML DOM Label object
Label object
The Label object represents an HTML- and keygen-and-gt;
Access the Label object
You can use getElementById() to access the elements of the .lt;label:
Create a Label object
You can use the document.createElement() method to create the element of the slt;label:
Label object properties
Attributes | describe |
---|---|
control | Returns the control of the label. |
form | Returns a reference to a form containing Label. |
htmlFor | Set or returns the value of the for attribute of the Lable. |
Standard properties and events
Label objects also support standard properties and events.
Related articles
HTML tutorial: HTML forms
HTML Reference Manual: HTML slt;label.gt; Tags