HTML | Tags and Attributes [FORM] [Text and Input Box]

Ü How to include Text Fields or Input Fields?
            To include a text field we will input the <INPUT> tag in between the <FORM>....</FORM> tags. Consider the following,
            <INPUT TYPE=”....” NAME=”....” VALUE=”....” SIZE=”...” MAXLENGTH=”....” >
            The uses of the various attributes in the above code are given below
The value of this attribute in the case of text filed will be TEXT.
Here, the value is to label the content. It does not appear. But the value of this attribute should have to be unique in a form.
In the case of text fields, whatever we give as a value of the VALUE attribute appears initially in the text field. That is, if we write VALUE=”TANMAY”, TANMAY will initially appear in the text field.
The value of this attribute actually indicates the size of the text field. The values are given in numbers.
The value of this attribute actually defines the maximum number of characters which will be taken as input.
Now consider the following input and output.
Input :
Please input the informations -- ---<BR>
<INPUT TYPE="TEXT" NAME="firstname" VALUE="First name"SIZE="30" MAXLENGTH="50">First Name <BR>
<INPUT TYPE="TEXT" NAME="lastname" SIZE="30" MAXLENGTH="50">Last Name <BR>
<INPUT TYPE="TEXT" NAME="emailadd" SIZE="30" MAXLENGTH="100">E-mail address<BR>
<INPUT TYPE="TEXT" NAME="add" SIZE="30" MAXLENGTH="300">Address <BR>


Related Contents:

Recommended Recommends


Contact Us