--- title: HTMLSpanElement slug: Web/API/HTMLSpanElement tags: - API - DOM - Interface - Reference translation_of: Web/API/HTMLSpanElement ---
{{APIRef("HTML DOM")}}

The HTMLSpanElement interface represents a {{HTMLElement("span")}} element and derives from the {{ domxref("HTMLElement") }} interface, but without implementing any additional properties or methods.

{{InheritanceDiagram(600, 120)}}

属性

无特定属性;从其父元素{{domxref("HTMLElement")}}继承属性。

方法

无特定方法;从其父元素{{domxref("HTMLElement")}}继承方法。

说明

Specification Status Comment
{{SpecName('HTML WHATWG', "text-level-semantics.html#the-span-element", "HTMLSpanElement")}} {{Spec2('HTML WHATWG')}} No change from {{SpecName("HTML5 W3C")}}.
{{SpecName('HTML5 W3C', "text-level-semantics.html#the-span-element", "HTMLSpanElement")}} {{Spec2('HTML5 W3C')}} Initial definition, as {{HTMLElement("span")}} was associated with an {{domxref("HTMLElement")}} before that.

浏览器兼容性

{{Compat("api.HTMLSpanElement")}}

另请参阅