The <input> Element
Altogether
An input element is a combination of type, name, and identification. The following code shows an “input” element, wrapped in a “form” element, along with the three required attributes.
HTML
<form action="http://www.example.com/login.php" method="post" id="sign-in" class="basic-forms">
<input type="text" name="username" id="username_input" />
</form>
Adding the <input>
elements makes the <form>
element more useful. Specifying input types is how we ensure that the correct data is entered.
- Previous
- Next