Page 81 - TP_Prime_V2.2_Class8
P. 81

<BODY>

                 <FORM>

                 Choose Your Country:

                 <INPUT LIST="Countries" NAME="Country">

                 <DATALIST ID="Countries">

                 <OPTION VALUE="India">

                 <OPTION VALUE="China">

                 <OPTION VALUE="Indonesia">                                                                                 MORE ON HTML

                 <OPTION VALUE="Pakistan">

                 <OPTION VALUE="Bangladesh">
                                                                                    Output
                 <OPTION VALUE="Japan">
                                                                                                                          79
                 </DATALIST>

                 </FORM>

                 </BODY>

                 </HTML>

                  The <SELECT> Tag


                 The <SELECT> tag is used to add a drop-down list in  the HTML form. This tag produces a
                 list of options for the user with the help of <OPTION> tag. We can create a combo box using
                 <SELECT> and <OPTION> tags.


                 Adding  Combo  Box
                 Sometimes, it is necessary to display multiple options in the form of a drop-down menu or

                 list from which the user can select only one option at a time. This type of control is known
                 as combo box. 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. To create a combo box in a
                 form, use the following syntax:


                 <SELECT>
                 <OPTION> Option 1

                 <OPTION> Option 2
                 <OPTION> Option N

                 </SELECT>
   76   77   78   79   80   81   82   83   84   85   86