The HTMLHeadingElement interface represents the different heading elements. It inherits methods and properties from the HTMLElement interface.
Inherits properties from its parent, HTMLElement.
HTMLHeadingElement.align
DOMString representing an enumerated attribute indicating alignment of the heading with respect to the surrounding context. The possible values are "left", "right", "justify", and "center".No specific method; inherits methods from its parent, HTMLElement.
| Specification | Status | Comment |
|---|---|---|
| HTML Living Standard The definition of 'HTMLHeadingElement' in that specification. | Living Standard | |
| HTML5 The definition of 'HTMLHeadingElement' in that specification. | Recommendation | The align property is now obsolete. |
| Document Object Model (DOM) Level 2 HTML Specification The definition of 'HTMLHeadingElement' in that specification. | Obsolete | No change |
| Document Object Model (DOM) Level 1 Specification The definition of 'HTMLHeadingElement' in that specification. | Obsolete | Initial definition |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | Yes | Yes | 1 | Yes | Yes | Yes |
align
|
Yes | Yes | 1 | Yes | Yes | Yes |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | Yes | Yes | Yes | 4 | Yes | Yes | ? |
align
|
Yes | Yes | Yes | 4 | Yes | Yes | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadingElement