Behaviour
What does a reset button restore?
Reset puts every control back to its **default**, which is the state written in the HTML attributes. A field with value="Jane" shows Jane again after reset; it only becomes empty if the HTML had no value. To clear fields, set them to empty in JavaScript instead.
| Control | After reset it shows |
|---|---|
<input type="text" value="Jane"> | Jane (the value attribute), even if the user typed something else |
<input type="text"> with no value | An empty field |
| Checkbox or radio | Ticked only if the HTML has checked |
<select> | The option with selected, or the first option if none has it |
<textarea> | The text between the opening and closing tags |
<input type="file"> | No file selected |
<input type="hidden"> | Unchanged: setting .value on a hidden input rewrites its value attribute, so there is no older default to go back to |
Sources: WHATWG HTML Standard: resetting a form · MDN: <input type="reset">




