what the meaning of FOR in a label tag?

what the meaning of FOR in a label tag?

In HTML, What's the purpose of the attribute for in the label tag.

<label for = "Name">Name: </label> <% = Html.TextBox("Name")%> 

In the above sample, why the label tag has a for = "Name" attribute? To mark their association??? If I don't put for what gonna happen?

Thanks for helping

Using HttpContext.Current.Application to store simple data


Cant open Nerd Dinner 1.0 VS 2008 SP1 MVC 2
The for attrialthough e specifies which form element the label is bound to.. After using Automapper to map a ViewModel how and what should I test? The label element allows the user to commit focus to a form element by clicking on an associate label. How to map table records to Any type using Castle ActiveRecordIf you did not use the for attrialthough e, this association will not be made.. Why do I get a TypeInitializationException when calling HtmlHelper.AntiForgeryToken?
How to access model in jqueryIs it possible for a Master page to access Controller properties?


ASP.NET MVC - Wordpress Style URLs
If the user clicks on the label, and the for attrialthough e matches this id of the respective control, it will toggle the control..


If you click on the label, you may for instance check or uncheck a checkbox / radio although ton. The for attrialthough e tells what checkbox the label belongs to.. A complete case is available at http://www.w3schools.com/tags/tag_label.asp..


You must accomplish the same thing by including the form element within the "bound" label element. It's nice when you can't or don't want to commit IDs to your elements..
<label>    My Label    <input type="checkbox" /> </label> 

86 out of 100 based on 61 user ratings 296 reviews