How to Create Check Boxes with HTML?

Asked By 20 points N/A Posted on -
qa-featured

 

I'm starting to review again the languages that I've learned, starting in HTML. How do I create multiple questions with checkboxes using HTML?

 

SHARE
Answered By 5 points N/A #132769

How to Create Check Boxes with HTML?

qa-featured

Hi Patricia,

Here is a sample form with multiple questions and checkboxes.

Checkboxes are mostly used for instances where a user may want to select multiple options.

 

 

 

<form name="myForm" >
 
 
<p>Which fruits do you like?</p>
 
Mango: <input type="checkbox" name="fruit" value="mango"  /><br />
 
Banana: <input type="checkbox" name="fruit" value="banana"  /><br /> 
 
Orange: <input type="checkbox" name="fruit" value="orange"  /><br /> 
 
Apple: <input type="checkbox" name="fruit" value="apple"  />
 
<br /> 
<br /> 
 
<p>Which beverages do you like?</p>
 
Softdrink: <input type="checkbox" name="beverage" value="softdrink"  /><br />
 
Fruit Shakes: <input type="checkbox" name="beverage" value="fruitshake"  /><br /> 
 
Beer: <input type="checkbox" name="beverage" value="beer"  /><br /> 
 
Juice: <input type="checkbox" name="beverage" value="juice"  />
 
 
 
</form>

 

Related Questions