Creating a HTML checkbox with a clickable label

How to make a label of the check box clickable in HTML?


  • kmozzlerkmozzler Chicago
    edited February 2014

    You are looking for the "for" attribute of your label. Give you checkbox input an id and then reference that id in the "for" attribute of the label. Here is an example:

    <input id="myCheckbox" type="checkbox" /><label for="myCheckBox">Click the label to check the box!</label>


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion