What is the value of FOR in a tag tag?
In HTML, what is the purpose of the attribute for in the label tag.
<label for = "Name">Name: </label> <% = Html.TextBox("Name")%> In the above example, why does the tag label have the for = "Name" attribute? To mark their connection ??? If I don’t stand for what will happen?
thanks for the help
+4
4 answers
If you click on a label, you can, for example, check or uncheck the checkbox / radio button . The for attribute indicates which flag the label belongs to.
A complete example is available at http://www.w3schools.com/tags/tag_label.asp .
+3