✴️HTML input: password
allowing the user to write text without anyone else looking
Last updated
allowing the user to write text without anyone else looking
Last updated
The <input>
field for type="password"
can look something like this:
It essentially looks like an <input>
field with the type="text"
except that the user only sees dots instead of the text!
The id
for a type="password"
field corresponds with the <label>
's for
attribute
The name
can differ from the id
The minlength
and maxlength
(an integer) restrict the length of user input
We can use none, one or both of those attributes
The placeholder
offers a hint that will disappear on user input (and reappear if reset)