splitforms.com

HTML · FORM CONTROL

HTML Label — connect text to a form control (live demo)

Last reviewed

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.

  • 500 free total
  • No backend
  • Copy-paste ready
Live demo · nothing is sent

What gets submitted

Fill in the form above and press its button. The demo stops the request and lists every name=value pair the browser would send, plus the controls it leaves out.

With a free access key in the form, these fields land in your splitforms dashboard; access_key and botcheck are read by splitforms, not stored as lead data.

Copy-paste code

HTML Label code you can paste today.

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.

Get free access key
label.html
<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>

Attributes · <label>

Which HTML Label attributes matter?

These attributes decide how the <label> behaves and what actually gets emailed to your inbox when someone submits.

HTML Label attributes and what each one does
AttributeWhat it does
forThe id of the control this label belongs to. Clicking the label focuses/activates that control.
formThe id of a <form> elsewhere on the page, if the label is not nested inside one.

Common mistakes

HTML Label not working? Here's why.

Most broken forms come down to a few small mistakes with the <label>. Check these before you ship, then forward every submission to Slack or a webhook.

  1. 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.

  2. One label per control

    A control should have exactly one label. Multiple labels confuse assistive tech and which one "wins" is inconsistent.

  3. 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.

Sources: WHATWG HTML Standard: <label> · MDN: <label>

Copy-paste ready

The HTML Label example below is a complete, working form — paste it into any HTML page and it submits, no edits to the markup required.

No backend to build

Your html label form posts to one endpoint. No server, PHP, or API route — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

A form that really submits

Unlike a static reference snippet, this <label> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Label to any page.

Copy the html label example, drop in your free access key, and paste it into any page — submissions start landing in your dashboard.

Copy the code

Copy the HTML Label example below.

Add your access key

Replace YOUR_ACCESS_KEY with a free splitforms key from the dashboard.

Paste into your site

Drop the form into any HTML page. Submissions arrive in your dashboard.

How SplitForms works

What happens after someone submits your form?

splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

A SplitForms contact form submission launching straight to your inbox

Add your endpoint

Point your form to your unique SplitForms endpoint. That's it.

HTML form pointing at a SplitForms submit endpoint

Receive submissions

We instantly capture and organize every submission in your inbox.

Submissions inbox with searchable leads and status pills

Route anywhere

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

Generic integration tiles for email, sheets, chat, CRM, automate, and webhook

No credit card required. Set up in under 60 seconds.

Connect & automate

Where can submissions go besides email?

On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more
NewTake payments on your formsDeposits, bookings, order forms — submitters check out through Stripe and the money goes straight to your Stripe account. Included on every paid plan.See plans →

Setup guides for the stacks you use

Questions

HTML Label questions, answered.

View all FAQs
What is the HTML label tag?

The <label> element adds a human-readable caption to a form control. When its for attribute matches a control's id (or the control is nested inside it), clicking the label focuses the field — improving usability and accessibility.

How does the label for attribute work?

for holds the id of the control the label describes. <label for="email">Email</label> paired with <input id="email"> links them, so clicking "Email" focuses the input and screen readers announce the field as "Email".

Should I wrap the input in the label or use for?

Both work. Wrapping (<label>Email <input></label>) is an implicit label; <label for="email">…</label> is explicit. Explicit labels with for are the most reliable across assistive technologies.

Why is my label not working?

Almost always because the for attribute doesn't match the control's id (people match name= instead), the id is duplicated on the page, or the label sits outside the form. Check that for and id are identical and unique.

Are labels required for accessibility?

Yes — every interactive form control should have a programmatically associated label. It's a WCAG requirement and the single biggest factor in whether a form is usable with a screen reader.

Simple pricing

How much does splitforms cost?

Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.

Free

$0— 500 submissions
 

No card, no time limit

Best for testing

For side projects and indie devs.

  • 500 free submissions
  • Unlimited forms
  • Email notifications included
  • Smart spam filtering
  • Submissions dashboard
  • Redirect after submit
  • MCP server included

Annual

$49/ year
About $4.08/mo, billed yearly
Best value

Every Pro feature with triple the volume — $0.27 per 1,000 at full use.

  • 15,000 submissions / mo
  • Unlimited forms
  • Everything in Pro
  • File uploads with 5 GB storage
  • 3 team seats
  • Priority email support

No credit card required on Free • Cancel anytime • Full pricing and FAQ