# Elementname: `Span`

CSS name: span

## Description

Surround text by styling options.

Allowed attributes: background-color, background-padding-bottom, background-padding-top, class, id

Child elements: A, Action, B, Br, Color, Fontface, ForAll, Frame, HSpace, I, Image, Loop, NoBreak, Span, Sub, Sup, Switch, U, URL, Value

Parent elements: 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.

id (text, optional)

  CSS id for this element.

## Example

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

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

# Commands

- A
- Action
- AddSearchpath
- AtPageCreation
- AtPageShipout
- AttachFile
- Attribute
- B
- Barcode
- Bold
- BoldItalic
- Bookmark
- Box
- Br
- Case
- Circle
- Color
- Column
- Columns
- Compatibility
- Contents
- Copy-of
- DefineColor
- DefineFontalias
- DefineFontfamily
- DefineTextformat
- Element
- Fontface
- ForAll
- Frame
- Grid
- Group
- Groupcontents
- HSpace
- Hyphenation
- I
- Image
- Include
- Initial
- InsertPages
- Italic
- Layout
- Li
- LoadDataset
- LoadFontfile
- Loop
- Makeindex
- Margin
- Mark
- Message
- NewPage
- NextFrame
- NextRow
- NoBreak
- Ol
- Options
- Otherwise
- Output
- Overlay
- PDFOptions
- Pageformat
- Pagetype
- Paragraph
- PlaceObject
- Position
- PositioningArea
- PositioningFrame
- ProcessNode
- Record
- Regular
- Rule
- SaveDataset
- SavePages
- SetGrid
- SetVariable
- SortSequence
- Span
- Stylesheet
- Sub
- Sup
- Switch
- Table
- Tablefoot
- Tablehead
- Tablerule
- Td
- Text
- Textblock
- Tr
- Trace
- Transformation
- U
- URL
- Ul
- Until
- VSpace
- Value
- While

Version: 3.2.0 | Start page | Command reference | Other language: German