How to set HTML tag id?
Two questions, two answers:
What is the 'for' attribute here?
This is the identifier of the element
<input>to which the label belongs. Some browsers will use it to focus on this element<input>when the user clicks on this<LABEL>how to set css for this element?
and. If you want all CSS shortcut elements:
label {
/* your styles */
}
. , , .
HTML Label Tag . , "" , -
<form>
<label for='ford'>Ford Car</label>
<input type="radio" name="fordCar" id="ford" />
</form>
.
you can set id as well as class http://www.w3schools.com/tags/tag_label.asp
for the parameter "Indicates which form element is attached to the label", therefore, when the user clicks on the shortcut, he focuses on the target input.