Row & Column Spanning

Just like HTML tables, STL supports `rowSpan` and `colSpan` to create complex layouts.

Syntax

Attributes are added in curly braces `{ }` before the cell content.

STL
{colSpan="2"} Cell Content
STL
{rowSpan="3"} Cell Content

Attributes

  • `colSpan`: Number of columns the cell should span horizontally.
  • `rowSpan`: Number of rows the cell should span vertically.
Column Span Example
STL
#table cols: 3 [header] {colSpan="2"} Item Details | Price [body] Laptop | 16GB RAM | $1200
Row Span Example
STL
#table cols: 2 [body] {rowSpan="2"} Electronics | TV Monitor {rowSpan="2"} Furniture | Chair Table

How Spanning Works

When using span attributes, the parser handles the cell layout automatically.

  • Column Span: The cell expands horizontally across the specified number of columns.

  • Row Span: The cell expands vertically. Simply omit the cell in subsequent row(s) where the spanned cell would have occupied space.

Note: When using `rowSpan`, the parser handles cell omission automatically — you just need to skip writing the spanned cell in the following rows.

Sanity Table LogoStructured Tables
Fast, free and open source.
Write in STL (Structured Table Language), render anywhere.

Open Source under MIT License