Page 125 - Plus_V2.2_C8_Flipbook
P. 125

<OPTION> Option 2

                 <OPTION> Option N
                 </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>                                                Displaying drop-down list

                 Now, let us see how to create the form using CSS. If we are creating the form having a text box and
                 the submit button, the CSS statement would be as follows:



                   <!DOCTYPE HTML>
                   <HTML>
                   <HEAD>
                   <STYLE>
                   input[type=text]{ width:20%; display: inline-block;}
                   input[type=submit]{width:20%; background-color:green; color:white;}
                   </STYLE>

                   <TITLE>Form Tag using CSS</TITLE>
                   </HEAD>
                   <BODY>
                   <H1>Forms in HTML</H1>
                   <HR>
                   <FORM>                                                              Forms using CSS
                   <LABEL FOR="FNAME">Enter the full name in capital letters:</LABEL>
                   <INPUT TYPE="TEXT" ID="FNAME" NAME="FNAME"><BR><BR>
                   <INPUT TYPE="SUBMIT" VALUE="SUBMIT">
                   </FORM>
                   </BODY>

                   </HTML>


                                                                                 Links, Frames, and Forms in HTML5  123
   120   121   122   123   124   125   126   127   128   129   130