What is the use of "required" attribute in HTML5?
HTML5 introduced a new attribute for
<input> tag i.e
"required" which is a boolean attribute and specifies that the input type must be filled with some data for the
form to be submitted. In other words, to submit a form, the input type with required attribute should have some data and cannot be blank.
<input type="name" required>