Page 83 - TP_Play_V2.2_Class8
P. 83

The <OPTION> tag specifies an option in the drop-down list. To add the combo box in the form, follow
                 the syntax as given below:

                 <SELECT>
                 <OPTION> Option 1

                 <OPTION> Option 2
                 <OPTION> Option N
                 </SELECT>
                 For example:


                 <SELECT NAME="City">
                 <OPTION>Science
                 <OPTION>Commerce

                 <OPTION>Arts
                 </SELECT>
                 The above code will create a dropdown list in which three options are available.

                 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>
                 Let us create a web page containing login form to accept the user name and password from the user.
                 Code to create the Form.html is as follows:

                 <!DOCTYPE html>

                 <HTML>

                 <HEAD>
                 <TITLE> Login Form </TITLE>




                                                                                                  #Forms in HTML5  81
   78   79   80   81   82   83   84   85   86   87   88