<input type=”reset”>

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Value of
How To Define Input Type In HTML (All The Values And Attributes)
What does <input type=”reset”> do?
Defines a button on a form that will return all fields to their default values.

Code Example

<form action="myform.cgi">
<input type="password" name="password" id="password" maxlength="6">
<label for="password"> Type a fake password here</label>
<br><input type="reset" value="Reset">
</form>

The reset value of input displays a Reset button on a form. Clicking this button will set all of the form fields back to their default value. In some cases, this will clear the fields, depending on the form settings.

Avoiding User Frustration

The reset input is intended to provide an easy way for a user to start over, but it can have unintended consequences. We all know how easy it is to click Reset instead of Submit. If that happens, the user is going to clear all of their entries, rather than sending the data as intended. Most users don’t particularly like it when this happens.

If you’ve provided a long form, it’s a good idea to add a confirmation alert that prevents someone from hitting Reset accidentally. Also, take care to place the Reset button logically on the page, and ideally, well away from the Submit button.

Remember: reset is not obligatory, so if you don’t need to include it, it’s safest to completely omit it.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for reset

iefirefoxchromeedgesafariopera
AllAllAllAllAllAll