HTML — Using the Label Tag
The <label>
tag is used to define labels for input fields. It improves accessibility and helps screen readers understand forms.
Use the for
attribute to link the label to the input's id
.
<label for=\"email\">Email:</label>
<input type=\"email\" id=\"email\" name=\"email\" /