What's the “for” for in a label tag?

后端 未结 6 2015
臣服心动
臣服心动 2021-01-31 07:10

Just ran across a for parameter in an HTML label tag:


*         


        
6条回答
  •  情话喂你
    2021-01-31 07:32

    It ties the label to a form element id. Some form elements, like checkboxes, can be activated by clicking on their label.

提交回复
热议问题