Computer Science, asked by krishnakoonoth7539, 1 year ago

Why should the value of the 'for' attribute of label tag be same as the id of the corresponding input element?

Answers

Answered by Anonymous
14

HTML <p> tag, with the CSS property font-size. HTML5

Answered by anjaliom1122
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