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

<p>The <strong><code><span class="external">HTMLSpanElement</span></code></strong> interface represents a {{HTMLElement("span")}} element and derives from the {{ domxref("HTMLElement") }} interface, but without implementing any additional properties or methods.</p>

<p>{{InheritanceDiagram(600, 120)}}</p>

<h2 id="属性">属性</h2>

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

<h2 id="方法">方法</h2>

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

<h2 id="说明">说明</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', "text-level-semantics.html#the-span-element", "HTMLSpanElement")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>No change from {{SpecName("HTML5 W3C")}}.</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', "text-level-semantics.html#the-span-element", "HTMLSpanElement")}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>Initial definition, as {{HTMLElement("span")}} was associated with an {{domxref("HTMLElement")}} before that.</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>



<p>{{Compat("api.HTMLSpanElement")}}</p>

<h2 id="另请参阅">另请参阅</h2>

<ul>
 <li>The HTML element implementing this interface: {{HTMLElement("span")}}.</li>
</ul>

<div> </div>