<input>
The input element is a versatile form control whose behavior depends on its type attribute.
Syntax
<input type="text" name="field"> Examples
<input type="email" name="email" placeholder="you@example.com" required>
<input type="range" name="vol" min="0" max="100" value="50">
<input type="checkbox" name="agree" id="agree">
Output
Renders an email text field, a slider defaulting to 50, and a checkbox.
Notes
It is a void element with no closing tag. Type values include text, email, password, number, range, date, color, file, checkbox, and radio. Always pair with a <label>.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |