HTML input tag | html text tag
ExampleAnHTMLformwiththreeinputfields;twotextfieldsandonesubmitbutton:
An HTML form with three input fields; two text fields and one submit button:
<form action="/action_page.php"> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <input type="submit" value="Submit"></form>
Try it Yourself »[1] Definition and UsageThe <input> tag specifies an input field where the user can enter data.
The <input> element is the most important form element.
The <input> element can be displayed in several ways, depending on the type attribute.
The different input types are as follows:
<input type="button"> <input type="checkbox"> <input type="color"> <input type="date"> <input type="datetime-local"> <input...