The problem with checkboxes and radio buttons is that they're small. You have to position your mouse pointer very accurately to be able to turn it on or off. With labels you can associate the form field with its accompanying caption. Clicking on the caption will turn the associated checkbox/radio button on or off. Give it a spin here:
Without the label tag
With text boxes clicking on the label will shift the cursor into the associated text box:
Enter your name (without label):
All you need to do is give the form field an id tag and associate the label with it:
<input type="checkbox" id="example2" /> <label for="example2"> With the label tag</label>
Or you could wrap the form field inside the label tag if you want to avoid the id mappings:
ReplyDelete<label><input ... /></label>
Thanks, Rakesh. Didn't know that.
ReplyDeleteWe would like you to write for our products on regular basis. Please email us at seema@spacify.com
ReplyDeleteThanks... Your blog helped me in getting Innovation point [:)]
ReplyDelete