Want to give your visitor the ability to clear all form data they entered? This article will give you the code to input the button they'll need to clear their data.

Steps

  1. 1
    Create an HTML form with the <form> tag.
  2. 2
    Create several options that the user can type in information or click a selection button, or do something.
    Advertisement
  3. 3
    Create your reset button. Type the <input type="reset"> tag into the code towards the top and/or bottom of the HTML form.
  4. 4
    Close the form after all input fields are entered with a final </form> tag.
  5. 5
    Save and preview your new adjusted form with the new reset button. Try it out, to see if it works correctly; click a selection or type a value and then click the reset button.
  6. Advertisement

Community Q&A

  • Question
    I have done the coding right, but the reset won't work. What should I do?
    Community Answer
    Community Answer
    if you are trying to reset the HTML form's fields by clicking a button, you should call a javascript function through that button and, in that function, you would be able to access all HTML forms' input fields and reset them to whatever you want.
Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 87,407 times.
How helpful is this?
Co-authors: 3
Updated: February 16, 2020
Views: 87,407
Categories: HTML
Advertisement