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.
Updated June 2026 · The <button> 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">
<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>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.
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">.