HTMLParagraphElement

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.

HTMLParagraphElement 接口为操作 <p> 元素提供了特殊属性(超出了其继承的常规 HTMLElement 对象接口的属性)。

EventTarget Node Element HTMLElement HTMLParagraphElement

实例属性

从父元素 HTMLElement 继承属性。

HTMLParagraphElement.align 已弃用

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

实例方法

没有指定的方法,从父元素 HTMLElement 继承方法。

规范

Specification
HTML
# htmlparagraphelement

浏览器兼容性

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
HTMLParagraphElement
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.

参见

  • 实现此接口的 HTML 元素:<p>