Home Tutorials HTML Tutorial Input Types
Input Types

Input Types


26. Input Types

HTML forms support many input types such as text, password, email, number, date, radio, checkbox, file, color, range, and more. These help browsers provide better input controls and validation behavior.

Syntax

<input type="text">
<input type="email">
<input type="date">

Example

<form>
    <input type="text" placeholder="Enter name"><br>
    <input type="email" placeholder="Enter email"><br>
    <input type="date"><br>
</form>

Output

Text, email, and date input fields are displayed.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Input Types to test your knowledge.

Browse Quizzes »