HTMLHeadingElement

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

HTMLHeadingElement 接口表示不同的标题元素,<h1><h6>,它从 HTMLElement 接口继承方法和属性。

EventTarget Node Element HTMLElement HTMLHeadingElement

实例属性

从其父接口 HTMLElement 继承属性。

HTMLHeadingElement.align 已弃用

表示枚举属性的字符串,指示标题内容相对于周围上下文的对齐方式。可能的值有 "left""right""justify""center"

实例方法

没有特定的方法,从其父接口 HTMLElement 继承方法。

规范

Specification
HTML
# htmlheadingelement

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
HTMLHeadingElement
align
Deprecated

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Deprecated. Not for use in new websites.

参见