The <label> tag defines the label (mark) for the input element. The label element does not present any special effects to the user. However, it improves usability for mouse users. This control is triggered if you click on text within the label element. That is, when the user selects the tag, the browser will automatically turn the focus on the form controls related to the tag. The for attribute of the <label> tag should be the same as the id attribute of the related element
Example 1:
Copy the code