<label>



HTML <label> Tag


The <label> tag is used to define a label for <input>, <meter>, <progress>, <select> and <textarea> tags.

Note: The <label> tag always comes with for attribute.

Example :

<form>
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname">
</form>

Output :