Why do we use reset button in HTML forms?

HTMLWeb DevelopmentFront End Technology

The reset button is used to reset all the input fields in HTML forms. It gets added using the <input> tag attribute type.

Example

You can try to run the following code to reset button in HTML forms −

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <form>
         Student Name:<br>
         <input type="text" name="sname">
         <br>
         Student Subject:<br>
         <input type="text" name="ssubject">
         <br>
         <input type="reset" value="reset">
      </form>
   </body>
</html>
raja
Published on 07-Feb-2018 08:15:57
Advertisements