Skip to main content

HTML Guide

The element “label” must not appear as a descendant of the “button” element.

A label element is not allowed as a descendant of a button element.

The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element’s labeled control, either using the for attribute, or by putting the form control inside the label element itself.

Learn more:

Last reviewed: October 27, 2022

Was this guide helpful?

Related W3C validator issues