Nice HTML tip

Add User-friendliness to an HTML CheckBox/RadioButton
The HTML CheckBox/RadioButton is selected only by clicking on the control and not the text associated with it. Using

For instance, the following checkbox is selected only by clicking the checkbox:


All Items
However, this checkbox can be selected either by clicking the checkbox or the text:



Note: This works only in IE.

Prasad Haridass

Source: DevX

Update (untested !) :

That works in Mozilla and Opera too, not just IE. You can also add an accesskey attribute to set a keyboard shortcut for the form element.

From Rick

 

3 Comments

Comments have been disabled for this content.