Input Type: Text

The text input type has already been covered, so moving on to the "password" type.


Input Type: Password

We can define a password field by using this line:

<input type="password">
HTML file: Displayed by browser:
<form>
 User name:<br />
  <input type="text" name="username">
<br /><br />
 User password:<br />
  <input type="password" name="psw">
</form>
User name:


User password:

The characters in a password field are masked (shown as asterisks or circles).

Back button Table of Contents Next button