splitforms.com

HTML · FORM CONTROL

HTML Button — submit, reset & button types (live demo)

Last reviewed

The <button> element is a clickable control. Inside a form its type= attribute decides what it does: submit sends the form, reset clears it, and button does nothing on its own (use it for JavaScript). The default type is submit, which surprises people. Below is a working form whose submit button actually sends data.

  • 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 Button 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
button.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">

  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required>

  <!-- type="submit" is the default inside a form; shown for clarity -->
  <button type="submit">Send message</button>
  <button type="reset">Clear</button>
</form>

Attributes · <button>

Which HTML Button attributes matter?

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

HTML Button attributes and what each one does
AttributeWhat it does
typesubmit (default — sends the form), reset (clears all fields), or button (no built-in behaviour — wire it to JavaScript).
nameSubmitted with the form when the button is the activator, along with its value.
valueThe value sent with the button's name when it triggers the submit.
disabledBoolean. Greys the button out and stops it from firing.
formactionOverrides the parent <form action> for this button only — handy for multiple submit targets.
formmethodOverrides the form's method (get/post) for this button.

Common mistakes

HTML Button not working? Here's why.

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

  1. Default type is submit

    A <button> with no type inside a form submits the form. If you only want it to run JavaScript, set type="button" explicitly or it will reload the page.

  2. Content goes between the tags

    Unlike <input type="submit" value="Send">, a <button> can contain HTML, icons, and styled text. Use value= on an <input>, but put visible content inside a <button>.

  3. IE sent the innerHTML

    Old browsers submitted a button's text content instead of its value=. Modern browsers send value= correctly, but it's why some forms still use <input type="submit">.

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

Copy-paste ready

The HTML Button 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 button 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 <button> form actually sends data to a free splitforms backend, with spam filtering built in.

How it works

How to add HTML Button to any page.

Copy the html button 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 Button 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 Button questions, answered.

View all FAQs
What are the HTML button types?

There are three: type="submit" (the default inside a form, which sends it), type="reset" (clears all the form's fields), and type="button" (a plain clickable button with no built-in behaviour, used for JavaScript).

What is the button tag in HTML?

The <button> element is a clickable control. Inside a form it can submit or reset the form depending on its type= attribute; outside a form it's a general-purpose button you hook up with JavaScript.

How do I make a submit button in HTML?

Use <button type="submit">Send</button> inside a <form>. The button submits the form to its action URL. (type="submit" is the default inside a form, but stating it is clearer.)

What is the difference between <button> and <input type="submit">?

Both can submit a form. A <button> can contain rich HTML (icons, styled text) between its tags, while an <input> only shows its value= as plain text. Use <button> for anything styled.

Why does my button reload the page?

Because its type defaults to submit inside a form, so it submits and the page navigates. Add type="button" if you only want it to run a JavaScript handler.

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