Password Field in HTML

When users type characters in a password field, the browser displays asterisks or bullets instead of the characters. Password text field is same as text field.

Password Field in HTML

Password Field in HTML

     

When users type characters in a password field, the browser displays asterisks or bullets instead of the characters. Password text field is same as text field. The only difference between them is that when a user entered into a password field, it shows a dot on the screen.

Understand with Example

The Tutorial illustrates an example from Password in HTML.In this Tutorial, the code illustrates a username and password text field.

<form action> :The page is to be displayed on clicking submit button.

<input type> : The HTML tag include a <input> tag. This is specified with the type of attribute.

<name> :The <name> is used to create name of the field.

The password text field mask the character or number entered by the user, Instead of showing number and character, it shows dots and asterisks.

The html code is saved with .html extension. Place the path of html code into a url of browser.

Example on Password

<form action="">

First Name:
<input type="text" name="Username">

Last Name:
<input type="password" name="password">

</form>

 

The output code is displayed as in browser

How it will look in the web browser is shown in the right window-

 
First Name:

Last Name 

 

Download