Page 93 - CodePilot V5.0 C8
P. 93

Code     Write the HTML code to display the given web page using form tags to create the
                      4      registration form.


                 <!DOCTYPE HTML>

                 <HTML>
                                                                                    HTML forms gather data from
                 <HEAD>
                                                                                   users, akin to how trees collect
                 <TITLE>Student Registration</TITLE>
                                                                                       nutrients from the soil.
                 </HEAD>
                 <BODY>

                 <H2>Student Registration Form</H2>
                 <FORM>

                 <LABEL FOR="name">Full Name:</LABEL><BR>
                 <INPUT TYPE="TEXT" NAME="NAME" ID="name"><BR><BR>

                 <LABEL>Gender:</LABEL>

                 <INPUT TYPE="RADIO" NAME="GENDER" ID="gender_male" VALUE="MALE">
                 <LABEL FOR="gender_male">Male</LABEL>

                 <INPUT TYPE="RADIO" NAME="GENDER" ID="gender_female" VALUE="FEMALE">
                 <LABEL FOR="gender_female">Female</LABEL><BR><BR>

                 <LABEL>Hobbies:</LABEL>
                 <INPUT TYPE="CHECKBOX" NAME="HOBBY" ID="hobby_reading" VALUE="READING">

                 <LABEL FOR="hobby_reading">Reading</LABEL>

                 <INPUT TYPE="CHECKBOX" NAME="HOBBY" ID="hobby_sports" VALUE="SPORTS">
                 <LABEL FOR="hobby_sports">Sports</LABEL>
                 <INPUT TYPE="CHECKBOX" NAME="HOBBY" ID="hobby_music" VALUE="MUSIC">

                 <LABEL FOR="hobby_music">Music</LABEL><BR><BR>
                 <LABEL FOR="class">

                 Select Your Class:
                 </LABEL>

                 <SELECT NAME="CLASS" ID="class">
                 <OPTION>Class 1</OPTION>
                 <OPTION>Class 2</OPTION>

                 <OPTION>Class 3</OPTION>
                 <OPTION>Class 4</OPTION>

                 <OPTION>Class 5</OPTION>
                 <OPTION>Class 6</OPTION>



                                                                                                                  91
                                                                                        Frames and Forms in HTML5
   88   89   90   91   92   93   94   95   96   97   98