Computer Applications
Illustrate the use of the radio button input type on an HTML form with an appropriate code and the corresponding output.
Answer
HTML code for radio button is as follows:
<HTML>
<BODY>
<FORM>
Gender :
<BR>
<INPUT TYPE = "RADIO" ID = "R1" NAME = "GENDER" VALUE = "MALE" CHECKED/>
<LABEL FOR = "R1"> Male </LABEL>
<BR>
<INPUT TYPE = "RADIO" ID = "R2" NAME = "GENDER" VALUE = "FEMALE" />
<LABEL FOR = "R2"> Female </LABEL>
</FORM>
</BODY>
</HTML>
Output
Related Questions
How can we reduce digital divide ? Give any two points.
How is CSS beneficial for web page development ? Give any two points.
Write the difference between <ol> and <ul> tags in HTML. Also write suitable examples of each to illustrate the difference.
What is the difference between <br> tag and <p> tag in context of HTML ? Illustrate using suitable examples.