Why should the value of the 'for' attribute of label tag be same as the id of the corresponding input element?
Answers
Answered by
14
HTML <p> tag, with the CSS property font-size. HTML5
Answered by
0
Answer:
The goal of this technique is to clearly tie a form control with a label by using the label element.
Explanation:
The for property is used to associate a label with a certain form control. The value of the for attribute must match the value of the form control's id attribute. The for property is used to associate a label with a certain form of control. The value of the for attribute must match the value of the form control's id attribute. Although the id and name attributes might have the same value, both must be specified, and the id must be unique inside the Web page.
Similar questions