Page 89 - TP_Play_V2.1_class8
P. 89
• SUBMIT: This value is used to create a submit button control. The submit button control is
used to submit all the entered values in the form to the specified URL.
• RESET: This value is used to create a reset button control. The reset button control, when
clicked, clears all the values entered in the form fields.
• PASSWORD: This value is used to create a password field. A password field is just like a
text box field. The only difference is that the text entered in the password field will not be
readable because it appears in the form of star symbols.
VALUE: This attribute is used to specify the default value of the field.
Adding Text Box
A text box allows a user to enter data such as character and number.
To add the text box in a form, follow the syntax below:
<INPUT TYPE="TEXT" NAME="Name of the textbox" SIZE="size of the textbox"
VALUE="default value of textbox">
For example:
<INPUT TYPE="TEXT" NAME="EName1" SIZE="30" VALUE="Enter User Name">
TYPE="Text" indicates that the form element is text box.
NAME="EName1" is the name of the text box.
VALUE="Enter User Name" is the default value of text box.
Let us create a web page to display the text box.
<!DOCTYPE html>
<HTML>
<BODY>
<FORM>
USER NAME:
<INPUT TYPE="TEXT"
NAME="EName1"
SIZE="30"
VALUE="Enter User Name">
</FORM>
</BODY>
Output
</HTML>
Adding a Radio Button
Radio buttons are used when a user has to make a selection among multiple choices or options.
It is generally used for selection of gender, quiz questions, etc. For example, to accept the gender,
the programmer needs to create 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.
Images, Links and Frame in HTML5 87

