<span>

Description

Marks a section of inline text in a paragraph for styling via CSS.

The <span> element is a styling aid. In itself, it does not affect the content or style of the enclosed text. When a class or id is applied to a <span> element, the enclosed content may be styled via CSS.

Attributes

No attributes other than standard attributes are defined for <span> elements.

Immediate descendants

<span> elements may contain text, interleaved with the following immediate descendants.

Element name Description
<emph> A emphasized span of text within a paragraph.
<graphic> An inline graphic within the paragraph text.
<span> A span of text within a paragraph.
<strong> A strongly highlighted span of text within a paragraph.
<sub> A subscript span of text within a paragraph.
<sup> A superscript span of text within a paragraph.

Immediate ancestors

Element name Relation
<cell> An enclosing cell in a table header or body.
<entry> An enclosing entry in a list.
<para> An enclosing paragraph.
<span> An enclosing span.
<sub> An enclosing sup.
<sup> An enclosing sup.

Example

<document xmlns="http://boradoc.org/1.0">
  <chapter>
    <para>
      The 
      <span class="special-text">second</span>
       word of this sentence is styled with the 
      <emph>special-text</emph>
       CSS class.
    </para>
  </chapter>
</document>

The above BDML renders to the following:

The second word of this sentence is styled with the special-text CSS class.