Dofactory.com
Dofactory.com
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 freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <button> type="reset"

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

A reset button clears all form values to their original values.

Example

#

A <button> element of type reset.
Change the name and click Reset. This will change the value back to the original value.



<form action="/tutorial/action.html">
  <label for="name">Name</label><br />
  <input type="text" id="name" name="name"
         value="Anna"><br />

  <button type="reset">Reset</button>
</form>

Using button type="reset"

The <button type="reset"> creates a reset button.

Clicking a reset button will clear all input elements in the form to their original value.

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


Syntax

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

Browser support

Here is when type="reset" 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>

Last updated on Sep 30, 2023

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 freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides