splitforms.com

HTML · FORM CONTROL

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

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 / mo
  • No backend
  • Copy-paste ready
HTML Button — copy-paste HTML form code that actually submits

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 — submissions land in your inbox and a searchable dashboard.

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.

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>

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.

The <button> element

Which HTML Button attributes matter?

The <button> element takes a handful of attributes — these decide how your form behaves and what actually gets emailed to your inbox when someone submits.

  • type — submit (default — sends the form), reset (clears all fields), or button (no built-in behaviour — wire it to JavaScript).
  • name — Submitted with the form when the button is the activator, along with its value.
  • value — The value sent with the button's name when it triggers the submit.
  • disabled — Boolean. Greys the button out and stops it from firing.
  • formaction — Overrides the parent <form action> for this button only — handy for multiple submit targets.
  • formmethod — Overrides the form's method (get/post) for this button.
HTML Button attributes reference

Common mistakes

HTML Button not working? Here's why.

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

  • 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.
  • 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>.
  • 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">.
Common html button mistakes to avoid

How SplitForms works

From form to workflow in 3 simple steps.

Connect your form, collect every submission, and send data where it needs to go — without building backend infrastructure.

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

Connect your favorite tools and automate everything

SplitForms works with the destinations you route to and the platforms you build on — from Slack and Sheets to WordPress, Shopify, and Next.js.

Connect your SplitForms form to Slack, Google Sheets, Mailchimp, Zapier and more

Trusted by indie teams and agencies shipping forms worldwide

PETAL/COKRAFT.DELINEAR-XBUILD.DEVSTUDIO 71MERIDIANFRAME&CO

Testimonials

Loved by developers shipping at every scale.

40 quotes on record — from indie hacks to agency migrations.

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

Start free. Scale when you need more.

Choose a plan that fits your workflow — from a free form endpoint to full automations, exports, and higher submission limits.

Free

$0

Free forever

 
Best for testing

For side projects and indie devs.

  • 500 submissions / mo
  • Unlimited forms
  • Email notifications included
  • Honeypot spam filtering
  • Submissions dashboard
  • MCP setup stays free
  • No credit card required

3-Year

$59/ 36 months
was $99 · save 40% · new-user price

Pay $59. 3 years sorted.

  • 15,000 submissions / mo
  • Unlimited forms
  • Everything in Pro
  • Renews every 3 years
  • Long-term discount
  • Priority support included
  • Vote on the roadmap

No credit card required on Free • Cancel anytime