<label> no longer has form attribute

Published: | Categories: DOM, HTML


The <label> element is no longer associated with any <form> according to the latest HTML spec. The support for the form attribute on <label>, introduced with HTML5, has been removed with Firefox 49 accordingly.

The form property on HTMLLabelElement DOM instances will instead return the labelled control’s form property if any, and null otherwise. In other words, label.form will be an alias of label.control.form.