USING FIELDSET TO GROUP CHECKBOXES

 

Which social media do you use?




 

HTML CODE

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Fieldset Example</title>
</head>

<body><h1 align="center">USING FIELDSET TO GROUP CHECKBOXES</h1>

<p>&nbsp;</p>

<form method="post" action="">

<fieldset>

<legend>Which social media do you use?</legend>

<p>
<input type="checkbox" name="socialmedia" value="youtube" id="youtube">
<label for="youtube">Youtube</label>
<br>

<label>
<input type="checkbox" name="socialmedia_" value="facebook" id="socialmedia_1">
Facebook</label>
<br>

<label>
<input type="checkbox" name="socialmedia_" value="tweeter" id="socialmedia_2">
Tweeter</label>
<br>

<input type="submit" name="submit" id="submit" value="Submit">

</p>
</fieldset>

</form>

<p>&nbsp;</p>
<p>&nbsp;</p>

</body>
</html>