Page 105 - CA 165 ver 1.0 Class 10
P. 105
ALIGN attribute is used for aligning the element with respect to the form margins.
SIZE attribute specifies the horizontal size of the text box.
Adding a Text Box
A text box allows a user to enter data such as any character and number.
Adding a Radio Button
Radio buttons are used when the user has to make a selection among multiple choices or options. It is
generally used for selection of gender, quiz questions, etc. For example, for accepting the gender, the
programmer needs to specify two radio buttons “Male” and “Female”, which belong to the same group
called “Gender” so that while inputting data a user will be able to select either “Male” or “Female” but not
both. For example:
<INPUT TYPE= “RADIO” NAME=“Gender” VALUE=“Male” CHECKED> Male
<INPUT TYPE=“RADIO” NAME=“Gender” VALUE=“Female”> Female
TYPE=“RADIO” indicates that the form element is radio button.
NAME=“Gender” is the name of the radio button group.
VALUE=“Male” and VALUE=“Female” signifies that one radio button has value “Male” and the other has
the value “Female”.
CHECKED attribute selects the specific radio button by default. Here, ‘Male’ radio button is checked by
default.
More About HTML 103

