agyanadda@gmail.com

HTML Input Types

HTML Forms 1 min read Updated Nov 30, 2026 Topic 27 of 33

Example

Example — Common input types HTML
<form>
  <input type="text" placeholder="Name"><br><br>
  <input type="email" placeholder="Email"><br><br>
  <input type="number" min="1" max="10" placeholder="1 to 10"><br><br>
  <input type="date"><br><br>
  <input type="color" value="#1e3a8a"><br><br>
  <input type="range" min="0" max="100"><br><br>
  <label><input type="checkbox"> I agree</label><br>
  <label><input type="radio" name="g"> Male</label>
  <label><input type="radio" name="g"> Female</label><br><br>
  <input type="file"><br><br>
  <input type="submit" value="Submit">
</form>

Radio buttons with the same name let you choose only one.

Try it Now »

Test Yourself With Exercises

Exercise 1 Multiple Choice

Which input type shows a date picker?

Exercise 2 True / False

Radio buttons with the same name allow only one choice.

Exercise 3 Fill in the Blank

To let users upload a file, use type="___".

Frequently Asked Questions

The browser checks the email format and phones show a keyboard with the @ key.