<span>

  • Revision slug: HTML/Element/span
  • Revision title: span
  • Revision id: 17394
  • Created:
  • Creator: osdm
  • Is current revision? No
  • Comment 1 words added, 3 words removed

Revision Content

This HTML element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. <span> is very much lika a {{ HTMLElement("div") }} element, but {{ HTMLElement("div") }} is a block-level element whereas a <span> is an inline element.

Attributes

Like all other HTML elements, this element has the global attributes.

Revision Source

<p>This HTML element is a generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the <strong>class</strong> or <strong>id</strong> attributes), or because they share attribute values, such as <strong>lang</strong>. It should be used only when no other semantic element is appropriate. &lt;span&gt; is very much lika a {{ HTMLElement("div") }} element, but {{ HTMLElement("div") }} is a block-level element whereas a &lt;span&gt; is an inline element.</p>
<h2>Attributes</h2>
<p>Like all other HTML elements, this element has the <a href="../../../../en/HTML/Global_attributes" rel="internal">global attributes</a>.</p>
Revert to this revision