Span
| Description | A generic inline container that groups text or other inline elements without imparting any additional semantic meaning. |
|---|---|
| Namespace | 1.7 2.0 |
| Category | inline |
Attributes
Specifies how the element is placed relative to surrounding content (e.g., block-level or inline flow).
Defines the direction of text flow (e.g., left-to-right, right-to-left, or vertical).
Sets the background color for the element’s content area.
Specifies the color of the border around the element.
Indicates the style of the border (e.g., solid, dashed, dotted).
Defines the thickness of the border line in user space units (such as points).
Determines the space between the element’s border (or boundary) and its inner content.
Applies the primary color (fill or stroke) for the text or graphic content.
Main indicator of type. This semantic association allows tools to present and support interaction with the object in a manner that is consistent with user expectations about other objects of that type.
Properties
Identifies the primary language for the text in this element (e.g., 'en-US'), aiding in proper text processing and accessibility.
Provides alternative text describing the element’s content, primarily for accessibility (screen readers).
Gives an exact text equivalent for non-textual or symbolic content, allowing screen readers to read it as plain text.
Differences
Well tagged PDF:
The 'Span' element serves as a generic inline container in Well-Tagged PDF for grouping text or other inline elements that do not have a more specific semantic role.
It should be used when no other specialized element is appropriate, ensuring that all inline content is properly encapsulated and logically structured.
PDFUA:
In PDF/UA, 'Span' provides a fallback for inline grouping when no other semantic element is applicable, supporting a coherent reading order.
Usage of 'Span' should be minimized in favor of more specific tags, but when used, it must be clearly defined within the structure tree to maintain accessibility.
Use cases
Span element is used to identify expansion text for a small object
Try itSpan element with layout attributes that identifis the change of styling
Try itTag Relationships
Click on any tag to view its details.