Answer: The input tag is used within form element to declare input controls that allow users to input data. An input field can be of various types depending upon the attribute type. The Input tag is an empty element which only contains attributes.
Explanation:
The HTML <input> tag is used within a form to declare an input element − a control that allows the user to input data. Three ATTRIBUTES are :
form
list
readonly
Step-by-step explanation:
An input field can vary in many ways, depending on the type attribute.
<input> elements are used within a <form> element to declare input controls that allow users to input data
The <input> tag specifies an input field where the user can enter data. <input> elements are used within a <form> element to declare input controls that allow users to input data.
The 3 attributes are :
<input form=""> : The value of this attribute must be the id attribute of a <form> element in the same document.
<input list="datalist_id"> : Specifies the id of the datalist to bind the <input> element to a specific list.
<input readonly> : The readonly attribute is a boolean attribute. When present, it specifies that an input field is read-only. The readonly attribute can be set to keep a user from changing the value until some other conditions have been met