Bookmark and Share

HTML - Password Fields

HTML password fields are designed to capture user input, but disguise each character with an asterisk (*) instead of displaying the entered digits. They offer a user on-screen privacy while he or she is entering a password.

Advertise on Tizag.com

Password fields are placed on a website using the <input> tag and specify a value of "password" for the type attribute.

HTML Password Field Code:

<form name="myWebForm" action="mailto:youremail@email.com" method="post">
Password: <input type="password" title="Please Enter Your Password" size="8" /><br />
<input type="submit" value="SUBMIT" />
</form>

HTML Password Fields:

Password:

HTML - Password Fields: Attributes

Password form fields may be customized using the same attribute as outlined in the HTML Text Fields lesson.

HTML Password Input Field Code:

<form name="myWebForm" action="mailto:youremail@email.com" method="post">
First: <input title="Please Enter Your First Name" id="first" name="first" type="text" size="12" maxlength="12" /> Last: <input title="Please Enter Your Last Name" id="last" name="last" type="text" size="18" maxlength="24" /><br />
Password: <input type="password" title="Please Enter Your Password" size="8" maxlength="8" /><br />
<input type="submit" value="SUBMIT" />
</form>

HTML Password Input Fields:

First: Last:
Password:

Password fields offer a very thin layer of security by visually concealing passwords; they offer no security whatsoever against maintaining the integrity of the password data. From data is processed in plain text and can be readily sniffed by a hacker, unless HTTPS is used to encrypt the data.

Bookmark and Share




Found Something Wrong in this Lesson?

Report a Bug or Comment on This Lesson - Your input is what keeps Tizag improving with time!

Advertise Here

More Tutorials!
Microsoft Office Tutorials Artist Tutorials