HTMLLabelElement: form property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The read-only HTMLLabelElement.form property returns an HTMLFormElement object which represents the form of which the label's associated control is a part, or null if there is either no associated control, or if that control isn't in a form.

This property is just a shortcut for HTMLLabelElement.control.form.

Value

An HTMLFormElement which represents the form with which the label's control is associated. If control is null (meaning the label isn't associated with a control), or if the control isn't part of a form, this property returns null.

Specifications

Specification
HTML Standard
# dom-label-form-dev

Browser compatibility

BCD tables only load in the browser

See also