Computer Applications
Answer
Two input elements are as follows:
- Text Box — A text box allows a user to enter alphanumeric data that is a combination of characters and numbers. It creates a single line text box. We can add a text box to the form in the following way:
Syntax:<INPUT Type= "Text"> - Checkbox — A checkbox is like a toggle switch which helps the user to select or deselect one or more items. We have to type the label next to the checkbox.
Syntax:<INPUT Type = "Checkbox" Name = "Hobbies" Value = "Reading">
The below example shows the usage of textbox and checkbox in a form:
<HTML>
<BODY>
<FORM>
<P>
NAME :
<INPUT TYPE = "TEXT">
</P>
<P>
CHOOSE YOUR QUALIFICATION : <BR>
<INPUT TYPE = "CHECKBOX" NAME = "C1" VALUE = "GRADUATE">
GRADUATE <BR>
<INPUT TYPE = "CHECKBOX" NAME = "C2" VALUE = "POSTGRADUATE" >
POST GRADUATE
</P>
</FORM>
</BODY>
</HTML>