Name
<label> — NN: 2, 3, 4 • MSIE: 2, 3, 4, 5 • HTML 4 - WebTV • Opera3
Synopsis
<label>...</label>
Used to attach information to form controls. Each
label
element is associated with exactly one form
control.
Attributes
for=
text
Explicitly associates the label with the control by matching the value of the
for
attribute with the value of theid
attribute within the control element.
Example
<LABEL for="lastname" >Last Name: </LABEL> <INPUT type="text" id="lastname" size="32">
Get HTML Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.