HTML: input type="password"

A password input masks characters on screen, but it does not encrypt the value or make an insecure login safe by itself.

What you will learn

Minimal example

<label for="password">Password</label>
<input id="password" name="password" type="password"
       autocomplete="current-password" required>

Connect a visible <label> to the input. Use current-password for an existing login and new-password when creating or changing a password.

Security and usability notes