+ 5
use of "FOR" attribute in html
<label for="email">Your e-mail address: </label>
2 ответов
+ 3
When used together with the <output> element, the for attribute specifies the relationship between the result of the calculation, and the elements used in the calculation.
+ 4
<label for="email>You Email Address:</label>
<input name="email" id="email" type="email" />
^the "for" attribute is referencing the input with the same name (ID attr). The purpose is so that if you click on the label, it'll put the cursor inside of the input box for you.
Further resource:
https://www.w3schools.com/tags/tag_label.asp