此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
HTMLHeadingElement
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
HTMLHeadingElement 接口表示不同的标题元素,从 <h1> 到 <h6>,它从 HTMLElement 接口继承方法和属性。
实例属性
从其父接口 HTMLElement 继承属性。
HTMLHeadingElement.align已弃用-
表示枚举属性的字符串,指示标题内容相对于周围上下文的对齐方式。可能的值有
"left"、"right"、"justify"和"center"。
实例方法
没有特定的方法,从其父接口 HTMLElement 继承方法。
规范
| Specification |
|---|
| HTML> # htmlheadingelement> |
浏览器兼容性
Enable JavaScript to view this browser compatibility table.
参见
- HTML 标题元素,从
<h1>到<h6>,对应于此接口。