Labels are good

June 15th, 2004

Web designers, for the love of god please remember to use the friggin’ <label> tag for your form elements, especially radio buttons and checkboxes.  It makes the text next to the form element clickable, so the user doesn’t have to land the cursor exactly on the wee little element.

Without the <label> tag you have to click on the button:

Can’t click me

But with the tag you can click on the text next to the button:

Here is the code:
<input name="mybutton" type="checkbox" id="mybutton"> <label for="mybutton">Click me</label>

Learn more at W3Schools

 

Comments are closed.