Skip to main content

html-tags.com

<label>

The caption of a form control, programmatically bound to it.

Baseline: Widely available · Forms

When to use it

Every control gets one — via for/id or by wrapping the control; clicking the label focuses the control.

When not to

placeholder is not a label: it vanishes on input and fails contrast; title is not a label either.

Key attributes

for
the id of the labeled control

Example

<label for='email'>Email</label>
<input type='email' id='email' name='email' autocomplete='email'>
Rendered live above, source below.

Authoritative references