HTML Password


Example

<input type="password" name="password">

The input element with a type attribute whose value is password creates a single-line text field similar to the input type=text, except that text is not displayed as the user enters it.

<input type="password" name="password" placeholder="Password">

Placeholder text is shown in plain text and is overwritten automatically when a user starts typing.

Sample password input field

Note: Some browsers and systems modify the default behavior of the password field to also display the most recently typed character for a short duration, like so:

Example of last character shown