Forma saysText-family input types — text, password, email, url — give the right keyboard and basic validation for free.
The type on a text input changes behavior. text is generic; password masks characters; email and url add format validation and, on mobile, show a tailored keyboard (the @ key for email, the / key for url).
Choosing the precise type is free UX: better mobile keyboards, sensible autofill, and built-in checks — all without a line of JavaScript.
Power-ups you unlock
text = generic · password = masked input
email / url add format validation
Mobile shows a keyboard matched to the type
Right type = free validation + better autofill
Captain Invalid Input attacks — common mistakes
Using type="text" for emails and losing validation + keyboard
Treating password masking as security (it is not encryption)
Assuming email validation guarantees a real, deliverable address
Boss battleMake text, password, email, and url inputs. Type an invalid email and try to submit — watch the browser block it.