The form attribute returns the FORM element containing this control. Retrieve the form attribute from the first LEGEND element and examine its value.