Menu
Forms & Inputs

Checkboxes & Radio Buttons

Multi-select and single-select choices.

1Choosing Options

Checkboxes let users pick any number. Radios let users pick exactly one — group them by sharing the same name attribute.

Example Code
<fieldset>
  <legend>Toppings</legend>
  <label><input type="checkbox" name="topping" value="cheese" /> Cheese</label>
  <label><input type="checkbox" name="topping" value="basil" /> Basil</label>
</fieldset>

<fieldset>
  <legend>Size</legend>
  <label><input type="radio" name="size" value="s" /> Small</label>
  <label><input type="radio" name="size" value="m" /> Medium</label>
  <label><input type="radio" name="size" value="l" /> Large</label>
</fieldset>

Finished reading?

Mark this topic as complete to track progress.