Page 83 - TP_Prime_V2.2_Class8
P. 83
The <TEXTAREA> Tag
The <TEXTAREA> tag is used to create a multi-line text input area that can accept long
text values. We can specify the number of rows and columns we want in text area by using
the ROWS and COLS attributes of the <TEXTAREA> tag.
The syntax of the <TEXTAREA> tag is as follows:
<TEXTAREA ROWS="2" COLS="70">
Let us create a student registration form by using form elements of HTML. The code to
create the registration form is as follows:
<!DOCTYPE html> MORE ON HTML
<HTML>
<HEAD>
<TITLE> Form </TITLE>
</HEAD>
81
<BODY STYLE="BACKGROUND-COLOR:lightyellow; COLOR:blue;">
<H1 STYLE= "TEXT-ALIGN: center"> Registration Form </H1>
<HR>
<FORM>
Name: <INPUT TYPE="TEXT"> <BR><BR>
Father's Name: <INPUT TYPE="TEXT"> <BR><BR>
Age in Years: <INPUT TYPE="TEXT"> <BR><BR>
Gender: <INPUT TYPE="RADIO" NAME="gender"> Male <INPUT TYPE="RADIO"
NAME="gender"> Female <BR> <BR>
Address: <TEXTAREA ROWS ="4" COLS = "80"> </TEXTAREA> <BR> <BR>
Hobbies: <BR>
<INPUT TYPE="CHECKBOX"> Playing Cricket <BR>
<INPUT TYPE="CHECKBOX"> Listening to Music <BR>
<INPUT TYPE="CHECKBOX"> Reading Books <BR>
<BR> <BR>
Enroll for Class:
<SELECT>
<OPTION> Class 1
<OPTION> Class 2
<OPTION> Class 3
<OPTION> Class 4
<OPTION> Class 5

