HTML Input Control Elements Password

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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



Got any HTML Question?