Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 89 - CodePilot V5.0 C8
P. 89

    Adding Password Field

                     The password field is a single-line input that masks characters as the user types, keeping the
                     password hidden.

                     The syntax to add the password field in the form is as follows:

                     <INPUT TYPE="PASSWORD" NAME="Name of Password Field"

                     ID="ID of Password Field" SIZE="Size of the password Field" PLACEHOLDER=
                     "The hint for the password">
                     The following code snippet uses the <INPUT> tag with TYPE=“PASSWORD” attribute to display a

                     password field:

                     <LABEL FOR="Pass">Password:</LABEL><BR>

                     <INPUT TYPE="PASSWORD" NAME="Pass" ID="Pass" SIZE="20"
                     PLACEHOLDER="Enter your password">

                     The output of the preceding code is as follows:
                                                                                                               Scan the QR
                                                                                                               for full code

                     Adding Buttons
                     In HTML forms, buttons can trigger different actions, such as submitting the form, resetting the

                     form or executing JavaScript functions. The types of buttons are:

                         Clickable button: It is an action button control. An action button control is used to perform an
                        action with a click.
                         Reset button: It resets and clears all the input fields in the form to their initial values.

                         Submit button: It sends form data to the server when clicked.

                     The syntax to add the buttons in the form is as follows:

                     <INPUT TYPE="VALUE" VALUE="Default value of textbox">
                     The following code uses the <INPUT> tag to create buttons:

                     <INPUT TYPE="SUBMIT" VALUE="Submit Form">

                     <INPUT TYPE="RESET" VALUE="Reset Form">
                     <INPUT TYPE="BUTTON" VALUE="Click Me">

                                                                                                                      87
                                                                                            Frames and Forms in HTML5

| 84 85 86 87 88 89 90 91 92 93 94 |