What is a <label> tag?
<label> tag is used to render a label of an input element.
Imagine you have a form with two text fields - first name and last name. Each text field is be defined by
<input type="text"/ > tag. How will the user know what to enter into each text field when it isn't labeled?
The solution is to use the
You could obviously use
<label> is better for usability, because the screen readers can understand that
<label> is labeling some field whereas
<span> is understood to be just some text.