The use of label labels is encountered in the form layout, and the label does not have any style effects and has the ability to trigger the corresponding form control.
For example, we can click on the radio button or the text corresponding to the selection box options to be selected, this is the text plus <label> tag implementation.
When you click the <label> tag text, the corresponding control is selected, and the value of the corresponding form control ID is the same as the for value within the label label.
Take a look at the following code
There is another way to wrap text and text boxes together with a label. Same effect
Sex <br/><label> male <input type = "Radio" name = "Sex" value = "man" ></label><label> female <input Type = "Radio" name = "Sex" value = "Woman" ></label>
Gender: MaleFemale
HTML form <label> tag basic syntax structure and use case tutorial