Understanding of the front-end properties for HTML tag

First: <label> Description:
. 1, <label> tag is defined as an input element label (identifier)
2, label elements are not presented to the user as to any special effects, only as a display
extension: however, it improves the usability for the user of a mouse . If you click on the text within the label element, it will trigger this control. That is, when the user selects this tag, the Liu
   browser will automatically focus to the label and the associated form controls
provided: for a tag property value should be the same label id attribute value associated with the Second element: <label> Properties detailed Description: 
3, for property  
provisions that form element binding  
effect is: click on the label will automatically move the focus to an element bound 
for example:  

<label><input type="radio" value="boy" name="sex" id="_boy">boy</label>  
<label><input type="radio" value="girl" name="sex">girl</label>
<label for="username">用户名:</label><input type="text" name="username" id="username">

Description: in particular the use CheckBox, if not binding, it requires a mouse click on the small box before they can select or deselect, after binding label can change the value of the CheckBox, the value of radio, move the focus to the text entry box gather      
  . 4, form property (HTML5 new)
  predetermined label field relevant to one or more form (form tab located outside)
  the attribute value of the form to which it belongs must form id value
  such as using more than one reference, a space-separated list

Guess you like

Origin www.cnblogs.com/yuer20180726/p/11257312.html