HTML5: Labels

W3School has this code snippet for doing Checkboxes

The result is like this
I have a bike
I have a car

Problem is, people have to specifically click on the checkbox. Lazy people like me would like little cursor movement as possible. Use of labels[1] is important.

Now that I added label tags, click on the label and the checkbox gets activated. Same applies for Radio buttons


Leave a Reply

Your email address will not be published. Required fields are marked *