Lesson 10 of 15

Input Types

Input Types

The <input> tag supports many types via the type attribute:

<input type="text">       <!-- single-line text -->
<input type="email">      <!-- email address -->
<input type="password">   <!-- masked text -->
<input type="number" min="0" max="100">
<input type="checkbox">   <!-- tick box -->
<input type="radio" name="choice" value="a">
<input type="date">       <!-- date picker -->
<input type="color">      <!-- color picker -->
<input type="range" min="0" max="100">

Radio buttons with the same name form a group — only one can be selected:

<input type="radio" name="size" value="s"> Small
<input type="radio" name="size" value="m"> Medium
<input type="radio" name="size" value="l"> Large

Your Task

Create a form with: email input, number input, checkbox, and radio button inputs.

HTML preview loading...
Loading...
Click "Run" to execute your code.