g
Printer Friendly Version

editor  
BellaOnline's HTML Editor
 

The HTML Form - Password Input Tag - 2

As in the last tutorial the password input tag does not have a closing tag </input>. Also the element name is still input.

Type Attribute
Here we must set the value of the type attribute to password to tell the web browser to hide the password as it is typed into the input field.

Name Attribute
As with the text input tag, you will set the value of the name attribute to something that represents the purpose of this input tag. I have set the value to password.

Value Attribute
It is a good practice to have the password input field to be blank initially. So here the value of the value attribute is set to null. This is done by putting two quotation marks after the equal sign.
value=""

Size Attribute
It is a common practice to set the value of the size attribute to the same number of characters as used for the username input field. A good size is 30 characters.
size="30"

Maxlength Attribute
Usually you are asked to choose a password when you sign up for a new account and you are given a maximum number of characters that you can have in that password. You will want to set the value of the maxlength attribute to this maximum number of characters. This will help to prevent new members/customers from creating a password that is too long.

← Back

|


This site needs an editor - click to learn more!

HTML Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 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 Editor Wanted for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2023 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor