Page 72 - Modular_V1.1_Flipbook
P. 72

The <INPUT> Tag

                  The <INPUT> tag is one of the most important form elements. It is used to create the controls
                  or fields to take the input from the user in the form of text, selection and click. The <INPUT> tag
                  has the following attributes:

                       TYPE: This attribute is used to specify the type of field we want to create. It takes one of the
                       predefined values. The predefined values for this attribute are:
                       •    TEXT: This value is used to create a text box field. A text box field is a one line text input

                           control. The text is the default value of the TYPE attribute.
                       •    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 check box control. A check box 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 on the click of it.
                       •    SUBMIT: This value is used to create a submit button control. The submit button control

                           is used to submit all the entered values in 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 similar

                           to a text box field. The only difference is that the text entered in the password field will
                           not readable because it appears in the form of stars symbol.
                       NAME: This attribute is used to specify the identity of the field on the web page.

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

                      USING <INPUT> TAG

                  The <INPUT> tag is the fundamental element of form. It is used to make fields to take input data
                  from user. We can create different input fields to gather various kinds of information form a user.
                  Adding a Text Box

                  A text box allows a user to enter data such as any character and number. Let us create a web
                  page to display a text box.

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

                  <INPUT TYPE="TEXT" NAME="EName1" SIZE="30" VALUE="Enter User name">
                  </FORM>
                  </BODY>
                  </HTML>


                  70      Touchpad MODULAR (Version 1.1)-IX
   67   68   69   70   71   72   73   74   75   76   77