Page 123 - Plus_V2.2_C8_Flipbook
P. 123
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> Checkbox and Radio Button </TITLE>
</HEAD>
<BODY>
HOBBIES:
<BR><FORM>
<LABEL FOR="HOBBY1"> Playing Cricket</LABEL>
<INPUT TYPE="CHECKBOX" ID="HOBBY1" NAME="HOBBY1">
<LABEL FOR="HOBBY2"> Watching Cartoons </LABEL>
<INPUT TYPE="CHECKBOX" ID="HOBBY2" NAME="HOBBY2">
<LABEL FOR="HOBBY3"> Listening to Music </LABEL>
<INPUT TYPE="CHECKBOX" ID="HOBBY3" NAME="HOBBY3">
<BR> <BR>
GENDER:
<BR>
<LABEL FOR="GENDER1"> Male </LABEL>
<INPUT TYPE="RADIO" ID="GENDER1" NAME="RADIOGROUP">
<LABEL FOR="GENDER2"> Female </LABEL>
<INPUT TYPE="RADIO" ID="GENDER2" NAME="RADIOGROUP">
</FORM></BODY>
</HTML>
Output:
Displaying checkboxes and radio buttons
Creating Buttons
A button is used to perform an action. There are three types of buttons can be created in HTML. Let us
create a web page named Buttons.html with the following code:
Links, Frames, and Forms in HTML5 121

