Page 81 - Plus V4 with Adobe class 8
P. 81

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>Aligarh
            <OPTION>Ghaziabad

            <OPTION>Meerut
            </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  79
   76   77   78   79   80   81   82   83   84   85   86