{{DOMRef}}
The HTMLLegendElement
is an interface allowing to access properties of the {{HTMLElement("legend")}} elements. It inherits properties and methods from the {{domxref("HTMLElement")}} interface.
Properties
Inherits properties from its parent, {{domxref("HTMLElement")}}.
Name | Description | Type |
---|---|---|
form {{readonlyInline}} |
The form that this legend belongs to. If the legend has a fieldset element as its parent, then this attribute returns the same value as the form attribute on the parent fieldset element. Otherwise, it returns null. |
{{domxref("HTMLFormElement")}} |
accessKey |
A single-character access key to give access to the element. | {{domxref("DOMString")}} |
align {{obsolete_inline}} |
Alignment relative to the form set | {{domxref("DOMString")}} |
Methods
No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "forms.html#the-legend-element", "HTMLLegendElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName("HTML5 W3C")}}. |
{{SpecName('HTML5 W3C', "forms.html#the-legend-element", "HTMLLegendElement")}} | {{Spec2('HTML5 W3C')}} | The property accessKey is now defined on {{domxref("HTMLElement")}}.The following property is now obsolete: align . |
{{SpecName('DOM2 HTML', 'html.html#ID-21482039', 'HTMLLegendElement')}} | {{Spec2('DOM2 HTML')}} | No change from {{SpecName("DOM1")}}. |
{{SpecName('DOM1', 'level-one-html.html#ID-21482039', 'HTMLLegendElement')}} | {{Spec2('DOM1')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoMobile(1.0)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
See also
- The HTML element implementing this interface: {{HTMLElement("legend")}}