Labels for Checkboxes

Checkboxes often precede their labels, but don't be confused. The "id" attribute still goes with the control, and the "for" attribute still goes with the label.

The Form:

Your Dog's Favorite Food

The HTML:

<fieldset>

<legend>Your dog's favorite foods:</legend>

<input id="kibble" type="checkbox" value="checkbox"><label for="kibble">Kibble</label>
<input id="chow" type="checkbox" value="checkbox"><label for="chow">Chow</label>
<input id="steak" type="checkbox" value="checkbox"><label for="steak">Steak</label>

</fieldset>