Computer Science, asked by AbhinavDeep7006, 1 year ago

in html, which attribute is used to specify that an input field must be filled out?

Answers

Answered by Anonymous
0
required attribute is used to specify that and input fielfd must be filled out.

example:

<input type="email" required>
Answered by amitnrw
1

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>

Similar questions