HTML | Tags and Attributes [FORM] [Password Fields]


Ü How we can create password fields ?
            To create password fields, we will use the <INPUT> tag in between the <FORM>...</FORM> tags. First of all, consider the following example,
              <INPUT TYPE=”.........” NAME=”.....” SIZE=”...” MAXLENGTH=”......”>
Here the TYPE will be obviously PASSWORD
and we can give any name as the value of the NAME attribute. The value of the SIZE attribute defines the size of the text field that will appear on the screen and the value of the MAXLENGTH attribute defines the maximum number of characters will be taken as input. Below there is a sample code with its output has been given.
Input :
<HTML><HEAD><TITLE> FORM </TITLE></HEAD>
<BODY>
<FORM>
Set your own password..<BR>
<INPUT TYPE="PASSWORD" NAME="pre" SIZE=30>Password.<BR>
<INPUT TYPE="PASSWORD" NAME="new" MAXLENGTH=30>Confirm Password.<BR>
</FORM></BODY></HTML>
Output:


Author: Tanmay Chakrabarty

Tanmay Chakrabarty is a former CSE student, currently working as a Senior Software Engineer with 5+ years of experience in the field of Web Application development in PHP+MySQL platform with strong skills in Javascript, JQuery, JQuery UI and CSS. He tries to write notes every week but fails due to heavy loads of duty.

Recommended Recommends

Comments

Contact Us