Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

HTML <button> type="submit"

The <button> tag with a type="submit" attribute creates a submit button.

When clicked, submit buttons send form data to a form handler.

Example

#

A <button> element of type submit.
Clicking the Submit button sends the textbox values to the server.

Contact information







<form action="/tutorial/action.html">
  <fieldset style="background: #f6f8ff; border: 2px solid #4238ca;">
    <legend>Contact information</legend>

    <input type="text" name="firstname" placeholder="First name"><br /><br />
    <input type="text" name="lastname" placeholder="Last name"><br /><br />
    <input type="text" name="email" placeholder="Email"><br /><br />
    <input type="text" name="phone" placeholder="Phone number"><br /><br />

    <button type="submit">Submit</button>
  </fieldset>
</form>

Using button type="submit"

The <button type="submit"> specifies a submit button.

Clicking a submit button sends form data to a form-handler on the server.

The button can contain text, images, icons, and other elements.


Syntax

<button type="submit">...</button>

Browser support

Here is when type="submit" support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <button>
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides