HTML Label — connect text to a form control (live demo)
A <label> connects a text caption to a form control. Linked with the for attribute (matching the control's id), it makes the field clickable, accessible to screen readers, and easier to tap on mobile. Below is a working form where every field has a proper label.
Updated June 2026 · The <label> element · 12 elements in the reference
<form action="https://splitforms.com/api/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<!-- Explicit label: for matches the input's id -->
<label for="name">Full name</label>
<input type="text" id="name" name="name" required>
<!-- Implicit label: the control is wrapped inside the label -->
<label>
Email
<input type="email" name="email" required>
</label>
<input type="checkbox" name="botcheck" style="display:none">
<button type="submit">Send</button>
</form>Replace YOUR_ACCESS_KEY with a key from your free splitforms dashboard. The form posts to one endpoint — submissions land in your inbox and dashboard with spam filtering built in.
for must match an id, not a name
The for attribute references the control's id. People often point it at name= by mistake, which silently breaks the association.
One label per control
A control should have exactly one label. Multiple labels confuse assistive tech and which one "wins" is inconsistent.
Placeholder is not a label
Placeholder text vanishes on focus and is invisible to many screen readers. Always add a real <label>; keep placeholders as short hints.