1.Using the label element allows the user to click on the text associated with the form control instead of having to click the radio button, check box, select box, etc.
2.To associate a label with another control implicitly, the control element must be within the contents of the Label element. In this case, the Label may only contain one control element. The label itself may be positioned before or after the associated control.
Example:-
<html>
<body>
// For Radio Button
<label for=”radio1″>Radio Button – Click this Label</label>
<input type=”radio” value=”Selected” name=”Radio” id=”radio1″>
// For CheckBox
<label for=”check”>Checkbox – Click this Label</label>
<input type=”checkbox” value=”Selected” name=”check” id=”check”>
</body>
</html>
Popularity: 8% [?]

December 3rd, 2008
admin
Posted in
Tags: 
