HTML reference

input type="reset"

A reset input returns the controls in its form to their initial values. It does not submit the form.

What you will learn

  • What “initial value” means for a reset
  • How reset differs from submit
  • How to prevent accidental data loss

Basic example

<form>
  <label>Name <input name="name" value="Yugien"></label>
  <button type="submit">Save</button>
  <input type="reset" value="Restore initial values">
</form>

The initial value comes from the control's markup, such as its value attribute. A reset does not necessarily restore the value the user last saved or the value loaded by your application.

Use it carefully

Related pages