MDN self-hosted library · e01.org

HTMLLabelElement: form property

HTML DOM

no runnable cells web-api-instance-property upstream source

HTML DOM

The form read-only property of the HTMLLabelElement interface returns an HTMLFormElement object that owns the control associated with this label, or null if this label is not associated with a labelable form-associated element (button, input, output, select, textarea, or form-associated custom elements) that is owned by a form.

Unlike form-associated elements, the <label> element does not have a form attribute. This property does not reflect any HTML attribute, but is just a shortcut for label.control.form.

Value

An HTMLFormElement or null.

Specifications

Browser compatibility

See also