in HTML by (32.2k points)
What is the use of the required attribute in HTML5?

1 Answer

0 votes
by (23.9k points)
It forces a user to fill text on the text field or text area before submitting the form. It is used for form validation.

Example:

Name: <input type="text" name="name" required>

Related questions

0 votes
0 votes
asked Sep 6 in HTML by Robindeniel (20.8k points)
0 votes
asked Dec 2, 2020 in HTML by Sandeepthukran (555 points)
0 votes
...