How are radio and checkbox attributes used for creating
check box control in HTML.
Answers
Answer:
is generally used in HTML forms. HTML forms are required when you need to collect some data from the site visitors. A radio button is used when you want to select only one option out of several available options.
Example:
<html>
<head>
<title>
Radio Button
<title>
</head>
<body>
<form>
Do you agree this statement?
<br>
<input type="radio"
name="agree"
value="yes">Yes
<br>
<input type="radio"
name="agree"
value="no">No
<br>
<input type="Submit">
</form>
</body>
</html>
Answer:
Radio button: It is generally used in HTML forms. HTML forms are required when you need to collect some data from the site visitors. A radio button is used when you want to select only one option out of several available options.
Explanation:
<html>
<head>
<title>
Radio Button
<title>
</head>
<body>
<form>
Do you agree this statement?
<br>
<input type="radio"
name="agree"
value="yes">Yes
<br>
<input type="radio"
name="agree"
value="no">No
<br>
<input type="Submit">
</form>
</body>
</html>