1. Technology
Send to a Friend via Email

<input type="password">


INPUT Password Description:

The password INPUT tag solicits passwords and any other type of text data that you want hidden as it is typed. The browser displays an asterisk instead of the letter that is typed. But the actual typed letter is what is sent to the form script or server.

DTD: HTML5: <!doctype html>
HTML4 Strict: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
HTML4 Transitional or Loose: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

INPUT Password Web Browser Support:

HTML Versions

INPUT Password Attributes:

Global attributes, event attributes and the input tag attributes. Plus:

  • autocomplete
  • maxlength
  • pattern
  • placeholder
  • readonly
  • required
  • size
  • select()
  • selectionStart
  • selectionEnd
  • setSelectionRange()

INPUT Password Usage:

Standard password input field

<input type="password">

See an example of a standard password input tag.

INPUT Password Special Notes:

Password fields act exactly like except that the contents is not displayed on the screen. Most browsers display an asterisk instead, but some just leave the field blank.

A password input field hides the text that is being submitted, but that is all the security it provides. The data is sent to the server in clear text unless you use a secure server.

More INPUT Password Information:

©2014 About.com. All rights reserved.