Back to Content

HTMLHeadingElement

files/en-us/web/api/htmlheadingelement/index.md

latest975 B
Original Source

{{ APIRef("HTML DOM") }}

The HTMLHeadingElement interface represents the different heading elements, <h1> through <h6>. It inherits methods and properties from the {{domxref("HTMLElement")}} interface.

{{InheritanceDiagram}}

Instance properties

Inherits properties from its parent, {{domxref("HTMLElement")}}.

  • {{domxref("HTMLHeadingElement.align")}} {{deprecated_inline}}
    • : A string representing an enumerated attribute indicating alignment of the heading with respect to the surrounding context. The possible values are "left", "right", "justify", and "center".

Instance methods

No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • The {{HTMLElement("Heading_Elements", "HTML heading elements")}}, <h1> to <h6>, which correspond to this interface.