
Information
The Basics
Text
Pictures
Spacing
Colors
Links
Alignment
Lists/Bullets
Tables
Frames
Multimedia
Forms
ISO Characters
Meta Tags
Contact Us

Email Support
Email Contact
|
 |
 |
Introduction
Password fields allow you to create a field, similar to a text field, that users can type into. This field however causes
everything show up as asterisks (*) so onlookers cannot see what is being typed.
Password Field
The tag to put a password field on your web site is <INPUT TYPE="PASSWORD" NAME="XXXX">. XXXX is replaced with the name of
the password field.
|
index.html - Notepad |
....<BODY>
<FORM METHOD="POST" ACTION="script.cgi"><INPUT TYPE="PASSWORD" NAME="pass1"> </FORM>
</BODY>....
|
|
|
My Homepage - Microsoft Internet Explorer |
|
|
Maximum Length
Maximum length specifies the maximum number of characters allowed in the password field. To specify maximum length, add the line
MAXLENGTH="X" to the <INPUT TYPE="PASSWORD" NAME="XXXX"> tag so the final result looks like
<INPUT TYPE="PASSWORD" NAME="XXXX" MAXLENGTH="X">. X is replaced with the number of characters allowed in the password
field.
|
index.html - Notepad |
....<BODY>
<FORM METHOD="POST" ACTION="script.cgi">
<INPUT TYPE="PASSWORD" NAME="pass1" MAXLENGTH="5">
</FORM>
</BODY>....
|
|
|
My Homepage - Microsoft Internet Explorer |
|
|
Field Size
Field size specifies the width of the password field. To specify field size, add the line
SIZE="X" to the <INPUT TYPE="PASSWORD" NAME="XXXX"> tag so the final result looks like
<INPUT TYPE="PASSWORD" NAME="XXXX" SIZE="X">. X is replaced with the desired width of the field.
|
index.html - Notepad |
....<BODY>
<FORM METHOD="POST" ACTION="script.cgi">
<INPUT TYPE="PASSWORD" NAME="pass1" SIZE="35">
</FORM>
</BODY>....
|
|
|
My Homepage - Microsoft Internet Explorer |
|
|
Initial Value
The initial value specifies what is already in the password field before the user edits it. To specify initial value, add the line
VALUE="X" to the <INPUT TYPE="PASSWORD" NAME="XXXX"> tag so the final result looks like
<INPUT TYPE="PASSWORD" NAME="XXXX" VALUE="X">. X is replaced with the desired initial value.
|
index.html - Notepad |
....<BODY>
<FORM METHOD="POST" ACTION="script.cgi">
<INPUT TYPE="PASSWORD" NAME="pass1" VALUE="157">
</FORM>
</BODY>....
|
|
|
My Homepage - Microsoft Internet Explorer |
|
|
Test Your HTML
|
|