in html, which attribute is used to specify that an input field must be filled out?
Answers
example:
<input type="email" required>
Answer:
Required
Explanation:
in html, which attribute is used to specify that an input field must be filled out?
HTML - Hyper Text Mark up Language
Used for web page designing
The required attribute specifies that an input field must be filled out before submitting the form.
It is a Boolean attribute
The required attribute works with the following input types:
text, search, url, tel, email, password, date pickers, number, checkbox, radio, and file.
Username: <input type="text" name="usrname" required>
Sample code
<!DOCTYPE html>
<html>
<body>
<h2>The required Attribute</h2>
<p>The required attribute specifies that an input field must be filled out before submitting the form.</p>
<form action="/action_page.php">
Username: <input type="text" name="usrname" required>
<input type="submit">
</form>
</body>
</html>