Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 56 - 2615_KEC
P. 56

    Clickable Buttons
                      This control creates a button that acts when clicked. The form has two types of buttons:
                         Submit: We can create a Submit button to send all the form data to the server. Syntax of
                        submit button:

                         <INPUT TYPE = "SUBMIT" NAME = "Name of the button" VALUE = "Text you want to display
                        on the button">
                         Reset: We can create a reset button to reset the values of all the controls to the initial values in
                        the form.

                      Syntax of reset button:
                         <INPUT TYPE = "RESET" NAME = "Name of the button" VALUE = "Text you want to display on
                        the button">

                      An HTML codes to create a form:

                      <!DOCTYPE html>

                      <HTML>
                      <HEAD>
                      <TITLE> Form </TITLE>

                      </HEAD>
                      <BODY STYLE="BACKGROUND-COLOR:lightyellow; COLOR:blue;">

                      <H1 STYLE= "TEXT-ALIGN: center"> Registration Form </H1>
                      <HR>
                      <FORM>

                      Name: <INPUT TYPE="TEXT"> <BR><BR>
                      Father's Name: <INPUT TYPE="TEXT"> <BR><BR>
                      Age in Years: <INPUT TYPE="TEXT"> <BR><BR>

                      Gender:  <INPUT TYPE="RADIO"  NAME="gender">  Male <INPUT TYPE="RADIO"
                      NAME="gender"> Female <BR> <BR>
                      Address: <TEXTAREA ROWS ="4" COLS = "80"> </TEXTAREA> <BR> <BR>
                      Hobbies: <BR>

                      <INPUT TYPE="CHECKBOX"> Playing Cricket <BR>
                      <INPUT TYPE="CHECKBOX"> Listening to Music <BR>

                      <INPUT TYPE="CHECKBOX"> Reading Books <BR>
                      <BR> <BR>
                      Enroll for Class:
                      <SELECT>

                      <OPTION> Class 1
                      <OPTION> Class 2

                      <OPTION> Class 3

                       54   Premium Edition-VII

| 51 52 53 54 55 56 57 58 59 60 61 |