Open In App

When to use the novalidate attribute in HTML Form ?

Improve
Improve
Like Article
Like
Save
Share
Report

The HTML novalidate attribute is a boolean attribute used to specify that the form-data should not be validated when submitting the form. It can be used with the HTML <form> element. 

It can be used in situations where you want the user to save the progress of form filling or if the form validation is disabled, the user can easily save the form and continue & submit the form later.

Syntax:

<form novalidate>

Example: In this example, we will see the use of the HTML novalidate attribute.

HTML




<!DOCTYPE html>
<html>
 
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
    <h2>
        When to use the novalidate
        attribute in the HTML Form?
    </h2>
    <form action="#" method="get" target="_self"
          novalidate>
        Name:
        <input type="text">
        <input type="submit" id="Geeks" name="myGeeks"
               value="Submit @ geeksforgeeks"
               formTarget="_blank">
    </form>
</body>
</html>


Output:


Last Updated : 01 Jun, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads