→ I Love Labels

11 August 2010

I really love when checkbox labels are done properly.

To see what I mean click on this checkbox's text label ("Click Me!"):

Click Me!

<input type="checkbox"> Click Me!

Nothing happened, right? Right.

Now click on this checkbox's text label:

<label><input type="checkbox"> Click Me!</label>

Yep, awesome. Here's another way to do it (in case your <label> and <input> tags are far apart):

<input type="checkbox" id="ckbx"> <label for=ckbx">Click Me!</label>