Page 127 - TP_Plus_v2.2_Class_8
P. 127

The <FORM> Tag

                 The <FORM> tag is used to create the form boundary on the web page. It is a container tag. All the

                 other form related tags such as <INPUT>, <SELECT> and <TEXTAREA> are used inside the opening
                 <FORM> and closing </FORM> tags. The syntax to use the <FORM> tag is as follows:

                             <FORM> Form Elements </FORM>
                 Some commonly used attributes of the <FORM> tag are as follows:

                    ACTION: This attribute is used to specify the action that will take place when we submit the form
                   values. It takes the URL of another web page or an e-mail address to receive the information.

                    METHOD: It specifies the type of method form will use to accept the values entered into form fields.
                   The most commonly used values for this attribute are POST and GET.

                      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 be
                      readable because it appears in the form of star 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.

                 The syntax of the <INPUT> tag is as follows:
                 <INPUT ATTRIBUTE="VALUE" NAME="VALUE">



                                                                                Images, Links and Frames in HTML5  125
   122   123   124   125   126   127   128   129   130   131   132