Page 86 - CodePilot V5.0 C8
P. 86

Attribute
                    Name                       Description                                   Example
                   ENCTYPE It  specifies how the form data should  be  <FORM ACTION=“/action_page.php”
                              encoded when submitting the form to the  METHOD=“POST” ENCTYPE=“text/
                              server. It can be application/x-www-form- plain”>

                              urlencoded, multipart/form-data or text/plain.

                  Understanding GET and POST Methods

                  The METHOD attribute specifies how data is transmitted to the server, either appended to the URL
                  or included in the HTTP request body.

                  The GET method is the default for form submissions. If no method is specified, GET is used and the
                  data appears in the browser’s address bar. For sensitive or personal information, use the POST
                  method, which has no size limitation and can send large data.

                      PRIVACY PRACTICES
                      While creating a form, avoid using the GET method to send sensitive data such as passwords or credit
                      card numbers because the data is exposed in the Uniform Resource Locator (URL).








                   The <FORM> tag was first introduced in HTML 2.0, which was released in November 1995.



                  THE <LABEL> TAG

                  The <LABEL> tag represents a caption for an item in a form. The syntax to use the <LABEL> tag is
                  as follows:

                  <LABEL FOR="ID OF INPUT ELEMENT">Label Text</LABEL>
                  The related <INPUT> tag can be nested inside the <LABEL> tag. The <LABEL> tag has one attribute,
                  FOR, which links the label to the ID attribute of the <INPUT> tag.


                  THE <INPUT> TAG
                  This is the most commonly used tag within HTML forms. You can specify various types of user
                  input fields using the <INPUT> tag. An <INPUT> tag can be of types like text, password, etc.

                  The following table lists the different attributes of <INPUT> tag:

                   Attribute Name             Values                                Description
                   TYPE               TEXT, PASSWORD,          It is used to specify the type of the <INPUT> tag. Its
                                      BUTTON, CHECKBOX,        default value is text.

                                      RADIO, SUBMIT and
                                      RESET.



                   84
                        CodePilot (V5.0)-VIII
   81   82   83   84   85   86   87   88   89   90   91