A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-input-typereset/ below:

HTML <input type=”reset”> - GeeksforGeeks

HTML <input type=”reset”>

Last Updated : 11 Jul, 2025

The <input type="reset"> creates a reset button in a form that clears all the input fields back to their default values.

HTML
<!DOCTYPE html>
<html>
<body>
<form>
  <input type="text" name="username" value="GFG">
  <input type="email" name="email" value="example@example.com">
  <input type="reset" value="Reset Form">
</form>
</body>
</html>
Syntax:
<input type="reset" value="Button Text">

Examples of <input type="reset"> usage:

Reset Checkboxes and Radio Buttons

Resets checkboxes and radio buttons to their default states.

HTML
<!DOCTYPE html>
<html>
<body>
<form>
  <label><input type="checkbox" name="subscribe" 
                checked> Subscribe</label>
  <label><input type="radio" name="gender"
                value="male" checked> Male</label>
  <label><input type="radio" name="gender"
                value="female"> Female</label>
  <input type="reset" value="Reset Selection">
</form>

</body>
</html>
Styled Reset Button

We can style the button using inline or external CSS.

HTML
<!DOCTYPE html>
<html>
<body>
<form>
  <input type="text" name="username"
         value="GFG">
  <input type="reset" value="Reset" 
style="background-color: blue; color: white; padding: 10px; border-radius: 5px;">
</form>
</body>
</html>
Why Use HTML <input type=”reset”> Interesting Facts about <input type="reset">

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4