legend
elementfieldset
element.interface HTMLLegendElement : HTMLElement { readonly attribute HTMLFormElement? form; };
The legend
element represents a caption
for the rest of the contents of the legend
element's
parent fieldset
element, if
any.
form
Returns the element's form
element, if any, or
null otherwise.
The form
IDL
attribute's behavior depends on whether the legend
element is in a fieldset
element or not. If the
legend
has a fieldset
element as its
parent, then the form
IDL
attribute must return the same value as the form
IDL attribute on that
fieldset
element. Otherwise, it must return null.