Page 136 - iPlus_Ver_2.0_class_7
P. 136

The <SELECT> Tag

                  Sometimes, we need to display multiple options in the form of a drop-down menu or list from
                  which we can select only one option at a time. The <SELECT> tag with the <OPTION> tag allows
                  us to create a drop-down list. The <OPTION> tag specifies an option in the drop-down list. The
                  syntax of the <SELECT> tag is as follows:
                  <SELECT>

                  <OPTION> Option 1

                  <OPTION> Option 2
                  <OPTION> Option N

                  </SELECT>
                  Let us create a student registration form by using the form elements of HTML. The code to create
                  the registration form is as follows:

                  <HTML>
                  <HEAD>
                  <TITLE> Form </TITLE>

                  </HEAD>
                  <BODY BGCOLOR="lightyellow" TEXT="blue">
                  <CENTER>

                  <H1> Registration Form </H1>
                  </CENTER>

                  <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




                   134
                         iPlus (Ver. 2.0)-VII
   131   132   133   134   135   136   137   138   139   140   141