HTML <input> required Attribute
Example An HTML form with a required input field: <form action=”/action_page.php”> Username: <input type=”text” name=”usrname” required> <input type=”submit”> </form> Try it Yourself » Definition and Usage The required attribute is a boolean attribute. When present, it specifies that an input field must be filled out before submitting the form. Note: The required attribute works with the following input types: text, search, url, […]
