usernameThe identifier used to sign in, even when its HTML type is email.
Authentication · Concept
Labels help people. Native types, names, and autocomplete tokens help browsers and password managers fill the same fields accurately.
The principle
Use a visible label for the person and a correct autocomplete purpose for their browser.
Live examples
Password managers depend on purpose. Sign-in asks for an existing credential; account creation asks the browser to generate or store a new one.
Purpose tokens
Keep stable, meaningful field names and standard autocomplete values. Do not invent values such as login-email that browsers do not recognize.
usernameThe identifier used to sign in, even when its HTML type is email.
current-passwordAn existing password used to authenticate this account.
new-passwordA password being created or changed; password managers may offer generation.
Do not fight helpers
Blocking paste, clearing autofilled values, or disabling autocomplete increases effort and interferes with password managers and assistive workflows.
These handlers and attributes make secure workflows harder.
<input type="password" autocomplete="off"
onpaste="return false">Native semantics leave users free to type, paste, or use a manager.
<label for="password">Password</label>
<input id="password" name="password"
type="password" autocomplete="current-password">Quick test
name.username and current-password for sign-in.new-password when creating or changing a password.