HTML
HTML Input TypesHTML Input Types
HTML input types change how the input field behaves.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
The HTML `` element transforms based on its `type` attribute. A `password` type hides text, while an `email` type validates the format. Developers use these types to ensure correct data entry.
Syntax
Syntax
Example
Example
Try it Yourself
Hands-on Practice
Modify the code below to see how it affects the output. This is the best way to learn!
Interactive Editor
1234567891011121314151617181920
Live Preview
Key Points
- The `type` attribute changes input behavior.
- The `email` type requires a valid address.
- The `password` type masks typed characters.
- The `radio` type limits to one selection.