The HTML Form - Password Input Tag

The HTML Form - Password Input Tag
The type of HTML input tag that we will discuss in this tutorial is the password input tag. The password input tag is very similar to the text input tag that we discussed in the last tutorial. You should read that tutorial before you continue. When you sign in to any private or protected area such as a customer account you encounter a form asking for your username and password. The input field for your username is created with the text input tag and the password input field is created with the password input tag. The most notable difference between these two types of input tags is the built-in security feature for the password input tag. When you type in your password you cannot see the characters of the password on the computer screen. This is because the password input tag tells the web browser to show a dot or an * in place of the characters that you type in. Give it a try below in the sample password input field.

Below is the basic code for this type of input tag.

<input type="password" name="password"
value="" size="30" maxlenght="10">
< left angle bracket
inputelement name
typetype attribute controls the type of input field - text, button, password, checkbox, hidden, file, radio, submit, reset, image
name name attribute is used to set an identification for the input field
valuevalue attribute is used to set initial text in the input field
sizesize attribute sets the physical size (in number of characters) for the length of the input field
maxlengthmaxlength attribute sets the maximum number of characters that can be entered into the input field
>right angle bracket
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

Next →


This site needs an editor - click to learn more!

Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map

Content copyright © 2022 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.