Page 55 - KEC Khaitan C7 Flipbook
P. 55

The Web browser displays the video and starts playing it. In some browsers, you need to click on
                 the play button to start the video.

                 The <audio> and <video> tags might not work in some browsers that do not support HTML5 and
                 the file formats.
                 WAV, MP3, and OGG are the file formats currently supported to embed audio.

                 MP4, WebM, and OGG are the file formats currently supported to embed video.




                           FORMS IN HTML

                 HTML forms are used to collect information from the site visitors. Different types of forms can be
                 created in HTML like sign up/register, application form, feedback form, query form, etc. The three
                 important components of a form in HTML are: a <FORM> tag, the input controls and buttons.

                 The <FORM> tag is used to define a form in an HTML document. It is placed within the <BODY>
                 tag. While designing and building a form, we use different input elements that allow site visitors
                 to type or select information. These elements can include text fields, radio buttons, checkboxes,

                 etc. All forms must include a Submit button. When the site visitor fills in the information, then,
                 it should be sent to the webserver for processing after the Submit button is clicked.


                 CREATING FORMS
                 The syntax for creating a form in HTML is:

                 <FORM NAME = "Name of the form” ACTION = "Script URL" METHOD = "GET/POST">

                 ...(Input Elements)
                 </FORM>

                   ACTION: This  attribute  specifies  what action  should  be  taken  once  the  SUBMIT  button  is
                   clicked by the user. The Script URL specifies the location where the data collected by the form is
                   submitted. It also produces a response in return.

                   METHOD: This attribute specifies what will happen when the form is submitted. Two values can
                   be assigned to the METHOD attribute, Get and Post.

                      Get: It is the default  value for the METHOD attribute. The form data is sent as the URL
                      variable, i.e., it appends the form data into the URL. Get value should not be used for sensitive
                      information.

                      Post: The form data is sent as an HTTP post transaction and form data is not appended to
                      the URL. This value is used for submitting sensitive information.


                 INPUT CONTROLS
                 Input controls are the elements that are used to accept input from the site visitors. All the controls
                 have to be filled in before submitting the form. Now, learn the various types of input controls.




                                                                                   Images, Links and Forms in HTML5  53
   50   51   52   53   54   55   56   57   58   59   60