Page 121 - Plus_V2.2_C8_Flipbook
P. 121
TEXT: This value is used to create a text box field. A text box field is a one line text input control.
The text is the default value of the TYPE attribute.
RADIO: This value is used to create a radio button control. A radio button control is used to
select only one option from a set of options.
CHECKBOX: This value is used to create a check box control. A check box control allows us to
select multiple options from a set of options.
BUTTON: This value is used to create an action button control. An action button control is used
to perform an action on the click of it.
SUBMIT: This value is used to create a submit button control. The submit button control is used
to submit all the entered values in 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 similar to
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 symbol.
NAME: This attribute is used to specify the identity of the field on the web page.
VALUE: This attribute is used to specify the default value of the field.
The <LABEL> Tag
<LABEL> tag is an important tag used as part of <FORM> tag to define labels for several form elements.
It has an attribute named FOR, which is used to associate the label with a specific form control, typically
an <INPUT> element. The value of the FOR attribute should match the ID attribute of the <INPUT>
element to which it is associated.
Creating a Textbox
A textbox is a control to take small amount of data like name, roll number, section, etc. as input from
the user. Let us create a web page named Textbox.html with the following code:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Text Box Example</TITLE>
</HEAD>
<BODY><FORM>
<LABEL FOR="NAME">Enter your name:</LABEL>
<INPUT TYPE="TEXT" ID="NAME" NAME="NAME">
</FORM></BODY>
</HTML>
Links, Frames, and Forms in HTML5 119

