checkbox input : checkbox « Form « HTML / CSS






checkbox input

  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Checkboxes</title>
</head>

<body>

  <form method="post" action="">
    <p>Choose your toppings:</p> 
    <ul> 
      <li> 
        <label for="top1"><input type="checkbox" id="top1" name="top1" value="pepperoni" checked="checked" /> Pepperoni</label> 
      </li> 
      <li> 
        <label for="top2"><input type="checkbox" id="top2" name="top2" value="xcheese" /> Extra cheese</label> 
      </li> 
      <li> 
        <label for="top3"><input type="checkbox" id="top3" name="top3" value="onions" /> Onions</label> 
      </li> 
      <li> 
        <label for="top4"><input type="checkbox" id="top4" name="top4" value="mushrooms" /> Mushrooms</label> 
      </li> 
      <li> 
        <label for="top5"><input type="checkbox" id="top5" name="top5" value="olives" /> Olives</label> 
      </li> 
    </ul>

  </form>

</body>
</html>

   
  








Related examples in the same category

1.checkbox Demo
2.Set check box width
3.Set input check box background color and color
4.CheckBox float: left;
5.CheckBox margin: 0 0 0 17px;
6.CheckBox width: 13px;
7.CheckBox height: 13px;
8.Checkbox Example
9.Checkboxes
10.Preselected Checkbox Example