Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 54 - 2615_KEC
P. 54

    Text Input Controls
                      There are three types of text input controls used on forms:

                      Single-line text input control

                      This control is used to enter single-line inputs. It is used as a search box or name. The two attributes
                      associated with single-line text input controls are: SIZE and MAXLENGTH. The SIZE attribute
                      defines the size of the text box and MAXLENGTH defines the number of characters the textbox
                      can hold.

                      Syntax of  single-line text input control:
                      <INPUT TYPE = "TEXT" NAME = "The word that describes the textbox" SIZE = "The width you
                      want to use for the text box" MAXLENGTH = "Maximum number of characters">

                      Write HTML codes for creating a single-line text input control:

                      <!DOCTYPE html>

                      <HTML>
                      <HEAD>
                      <TITLE> Single Line Text Input Control </TITLE>

                      </HEAD>
                      <BODY>
                      <FORM NAME = "Registration Form" METHOD = "POST" ACTION =
                      "mailto:info@orangeeducation.in">
                      <H1 STYLE = "text-align:center"> Registration </H1>
                      <B>ApplicantName:</B>

                      <INPUT TYPE = "TEXT" NAME = "APPLI_NAME" SIZE = "30" MAXLENGTH = "20">
                      <BR> <BR>
                      <B>Address: </B>
                      <INPUT TYPE = "TEXT" NAME = "ADDRESS" SIZE = "30" MAXLENGTH = "40">

                      </FORM>
                      </BODY>
                      </HTML>

                      Password input control

                      This control is same as the text input control, but it masks the characters as soon as the user enters
                      them. The characters entered/typed appear as * instead of normal text.

                       52   Premium Edition-VII

| 49 50 51 52 53 54 55 56 57 58 59 |