2026-10-05
<input type="text">
For single-line text input.
Example:
<input type="password">
For secure password input.
Example:
<input type="checkbox">
For multiple-choice options.
Example:
<input type="radio">
For single-choice options.
Example:
<textarea>
For multi-line text input.
Example:
<select>
For dropdown lists.
Example:
<input type="file">
For file uploads.
Example:
<input type="date">
For date selection.
Example:
<input type="time">
For time selection.
Example:
<label>, <fieldset>, and <legend>.alt attributes. <form action="/submit" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="John Doe">
<label for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="example@example.com">
<label for="message">Message:</label>
<textarea id="message" name="message" placeholder="Enter your message here" rows="4" cols="50"></textarea>
<input type="submit" value="Submit">
</form>E. Bruno - Introduction to HTML Forms