1. Home
  2. Computing & Technology
  3. Web Design / HTML

<input type="password" /> -

By Jennifer Kyrnin, About.com Guide

<input type="password" /> Description:

The <input type="password" /> tag submits passwords to the form.

<input type="password" /> Web Browser Support:
<input type="password" /> Attributes:

All attributes are optional unless indicated.

<input type="password" /> Usage:
  • standard password field:
    <form>
    <input type="password" /> </form>
  • password field with pre-populated data:
    <form>
    <input type="password" value="clickhere" /> </form>
  • password field with some styles added:
    <form>
    <input type="password" value="secretpassword" style="background-color:#cc0000; color: #ffffff;" />
    </form>
<input type="password" /> Special Notes:
  • Password fields act exactly like text fields, except the text entered is not displayed on the browser screen.
  • Using a password field will hide the text submitted, but if it's not submitted on a secure server, it still can be intercepted and read.
More <input type="password" /> Information:

Return to the <input /> Element
Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.