Version 5.8.0

# `Span`

since version 3.1.15

Surround text by styling options.

## Child elements

`A`, `B`, `Barcode`, `Br`, `Clip`, `Color`, `Fontface`, `ForAll`, `Frame`, `HSpace`, `I`, `Image`, `Loop`, `NoBreak`, `Span`, `Sub`, `Sup`, `Switch`, `U`, `URL`, `Value`

## Parent elements

`A`, `B`, `Case`, `Color`, `Fontface`, `ForAll`, `I`, `Li`, `Loop`, `NoBreak`, `Otherwise`, `Paragraph`, `Span`, `U`, `URL`, `Until`, `While`

## Attributes

`background-color` (text, optional, CSS property: background-color)
  The background color of the content
`background-padding-bottom` (length, optional, CSS property: background-padding-bottom)
  The bottom padding of the background color (can be negative)
`background-padding-top` (length, optional, CSS property: background-padding-top)
  The top padding of the background color (can be negative)
`class` (text, optional)
  CSS class for this element.
`fontfamily` (text, optional, since version 4.1.14)
  The name of the font family to switch to.
`id` (text, optional)
  CSS id for this element.
`language` (optional, since version 4.1.10)
  Name of the language for hyphenation and rendering.
`letter-spacing` (yes, no or length, optional, CSS property: letter-spacing, since version 3.5.2)
  Increase spacing between glyphs. Allowed values are yes, no and a length. With yes, the spacing depends on the current font size (0.1 em).
`role` (optional, since version 4.19.8)
  The role for PDF/UA (accessibility, tagged PDF)

## Example

    <Stylesheet>
      .green { background-color: lightgreen; }
    </Stylesheet>

    <Record element="data">
      <PlaceObject>
        <Textblock>
          <Paragraph>
            <Span class="green"><Value>green</Value></Span>
          </Paragraph>
        </Textblock>
      </PlaceObject>
    </Record>

#### On this page