Page 80 - SmartGPT_v4.0_C8_Flipbook
P. 80

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>
              For example:


              <SELECT NAME="City">
              <OPTION>Aligarh

              <OPTION>Ghaziabad
              <OPTION>Meerut

              </SELECT>
              Let us create a web page to display the combo box.

              <!DOCTYPE html>

              <HTML>
              <BODY>

              <FORM>
              Select Stream:
              <SELECT NAME="List Name">

              <OPTION>Science

              <OPTION>Commerce
              <OPTION>Arts
              </SELECT>

              </FORM>

              </BODY>
              </HTML>





                        SmartGPT (Ver. 4.0)-VIII
                 78
   75   76   77   78   79   80   81   82   83   84   85