Label Tags

The <label> tag
Defines a label to a control. If you click the text within the label element, it is supposed to toggle the control.
The “for” attribute binds a label to another element. Set the value of the “for” attribute equal to the value of the “id” attribute of the related element.
<label for=”element_name”>Last Name:</label>
<label for=”name”>Last Name</label>
for defines the name of the element for which this label is made.
Example Page in browser will look like
<label for=”name”> Name</label>
<input type=”text” name=”name” id=”name” />
Scroll to Top