Page 81 - TP-Play_V-2.0_Book-8
P. 81

Output

                CREATING FORMS IN HTML

            We have seen various types of forms such as registration form, login form and feedback form
            on the different types of websites. These forms are created by using HTML. Generally, a form is
            collection of different types of fields to take the input from the user on the web page. It replaces

            the paper-based forms used earlier. Nowadays, we notice that most of the schools, universities
            and other commercial organisations use the online forms to submit or accept the information.
            There are different types of fields such as text boxes, check boxes, radio buttons, drop-down
            menus and password are used  to accept different types of information.

            HTML provides two main tags which are <FORM> and <INPUT> to handle the forms on the web
            page. Let us learn about these in detail.
            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>
             The <FORM> tag has the two main attributes which are:

            ✶  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.







                                                                    Images, Links and Frames in HTML5        81
   76   77   78   79   80   81   82   83   84   85   86