The <label>
tag in HTML is used to provide a usability improvement for mouse users i.e, if a user clicks on the text within the <label>
element, it toggles the control.
Syntax
<label> form_content... </label>
<!-- By reference -->
<label for="first_name">First Name</label>
<input type="text" id="first_name" name="first_name">
<!-- By wrapping -->
<label>First Name
<input type="text" name="first_name">
</label>
<label for="id_of_what_you're_labeling"></label>
<!-- for example-->
<label for="username"></label>
<input type="text" id="username">
#html