HTML <input type=”reset”> Last Updated : 17 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The <input type="reset"> creates a reset button in a form that clears all the input fields back to their default values.Does not reset disabled fields: Any input fields with the disabled attribute are ignored during reset.Resets default values only: It resets to the original values specified in the HTML, not dynamically set values.Affects hidden fields: Hidden inputs are also reset to their default values.Does not reset placeholders: Placeholder text remains unchanged as it is not considered a value. HTML <!DOCTYPE html> <html> <body> <form> <input type="text" name="username" value="GFG"> <input type="email" name="email" value="[email protected]"> <input type="reset" value="Reset Form"> </form> </body> </html> The form includes fields for a username and email with default values.Clicking the "Reset Form" button clears user-entered data and reverts fields to their original values(Default values here).Syntax:<input type="reset" value="Button Text"><input>: Defines an input element.type="reset": Specifies the reset functionality.value="Button Text": Specifies the button's visible text.Examples of <input type="reset"> usage:Reset Checkboxes and Radio ButtonsResets 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 ButtonWe 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”>Allows users to clear form data quickly.Provides better user experience for long forms.Prevents users from manually deleting field data one by one.Simple to implement with minimal code.Interesting Facts about <input type="reset">Works only within the form scope: The reset button only affects inputs within the same <form> tag.Custom styling allowed: It can be styled using CSS like any other button.Resets text areas too: It clears or resets <textarea> elements in the form.Can trigger JavaScript: You can bind events to the reset button for additional functionality.Does not affect dynamically added fields: Fields added via JavaScript after page load won't have "default values" to revert to.No confirmation by default Clicking a reset button immediately resets fields without asking for confirmation (you can implement custom confirmation using JavaScript). Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Attributes Similar Reads HTML <input type = "button"> The HTML <input type="button"> element creates a clickable button that can be customized with text or an image. It does not have any default behavior but can be used to perform actions using JavaScript. It makes versatile for various interactive purposes in web forms and applications. Syntax 1 min read HTML <input type="checkbox"> The HTML <input type="checkbox"> creates a checkbox input element. It displays as a square box, checked when activated. Checkboxes enable users to select one or more options from a limited set of choices. Syntax <input type="checkbox"> Example: In this example, we will demonstrate using 1 min read HTML <input type="color"> The HTML <input type="color"> element is used to define a color picker. The value should be a seven-character hexadecimal notation representing RGB values in hexadecimal format. Its default value is #000000 (black). Syntax<input type="color"> Example: In this example, we will demonstrate 1 min read HTML <input type="date"> The HTML <input type="date"> element provides a date picker interface for selecting dates. It allows users to input dates using a calendar widget, ensuring standardized date input across different browsers and devices. Syntax<input type="date">Example: In this example, the HTML <inpu 1 min read HTML <input type="email"> The HTML <input type="email"> is used to create an input field specifically for email addresses. It automatically validates the input to ensure it follows the correct email format. Adding the "multiple" attribute allows the user to input multiple email addresses, separated by commas.Syntax< 1 min read HTML <input type="file"> The HTML <input type="file"> element is used to create a file input box in forms. It allows users to browse and select files to upload from the devices. When the form is submitted, the selected file(s) can be uploaded to the server. Syntax<input type="file"> Example: In this example, we 1 min read HTML <input type="hidden"> The HTML <input type="hidden"> element defines a hidden input field. Hidden fields store data that are not visible or modifiable by users when they submit a form. They are useful for including data that needs to be sent with the form but does not need to be displayed. Syntax<input type="hid 1 min read HTML <input type="image"> The HTML <input type="image"> element defines an image as a submit button within a form. When the image is clicked, the form is submitted, similar to a regular submit button. It allows for more visually appealing form submissions, as the image can serve as the button instead of a plain text or 2 min read HTML <input type="month"> The HTML <input type="month"> element creates a month picker, allowing users to select a specific month and year without specifying a day. It provides a standardized way to input month-based data to enhance user experience. Syntax<input type="month"> Example: This example demonstrate the 1 min read HTML <input type="number"> The HTML <input type="number"> element creates an input field for entering numeric values. It allows for easy input of numbers with optional restrictions such as minimum, maximum, and step values. This element enhances form validation by ensuring only numeric input is accepted, improving user 1 min read Like