Skip to content

The Label Element

The label tag provides a text label for an input element.

Each label element can be associated with an input element by using the “for” attribute which should match the “id” attribute of the input.

Label tags ARE read by screen readers and as such are far preferable to using the placeholder attribute of an input element to prompt the user.