Page 75 - Trackpad_V4.0_C8_Flipbook
P. 75

•  RADIO: This value is used to create a radio button control. A radio button control is used to select
                     only one option from a set of options.

                    •  CHECKBOX: This value is used to create a checkbox control. A checkbox control allows us to select
                     multiple options from a set of options.
                    •  BUTTON: This value is used to create an action button control. An action button control is used to
                     perform an action with a click.

                    •  SUBMIT: This value is used to create a submit button control. The submit button control is used to
                     submit all the entered values in the form to the specified URL.

                    •  RESET: This value is used to create a reset button control. The reset button control, when clicked,
                     clears all the values entered in the form fields.
                    •  PASSWORD: This value is used to create a password field. A password field is just like a text box
                     field. The only difference is that the text entered in the password field will not be readable because
                     it appears in the form of star symbols.

                    VALUE: This attribute is used to specify the default value of the field.

                 Adding Text Box

                 A text box allows a user to enter data such as character and number.

                 To add the text box in a form, follow the syntax below:

                 <INPUT TYPE="TEXT"  NAME="Name  of the textbox"  SIZE="size  of the textbox"
                 VALUE="default value of textbox">
                 For example:

                 <INPUT TYPE="TEXT" NAME="EName1" SIZE="30" VALUE="Enter User Name">
                 TYPE="Text" indicates that the form element is text box.
                 NAME="EName1" is the name of the text box.

                 VALUE="Enter User Name" is the default value of text box.
                 Let us create a web page to display the text box.

                 <!DOCTYPE html>

                 <HTML>
                 <BODY>
                 <FORM>
                 USER NAME:

                 <INPUT TYPE="TEXT"
                 NAME="EName1"
                 SIZE="30"

                 VALUE="Enter User Name">
                 </FORM>
                 </BODY>
                 </HTML>



                                                                                                 Forms in HTML5    73
   70   71   72   73   74   75   76   77   78   79   80