AsciiDoc tables
Use wc-asciidoc-table when you want readable, hand-authored tables with features Markdown tables do not cover — multi-line cells, column widths, spans, alignment, and CSV/DSV data.
DocsLit parses a focused subset of AsciiDoc table syntax at build time and emits a real HTML <table> (good for SEO and static hosting).
Basic table
Wrap an AsciiDoc table block in wc-asciidoc-table:
| Method | Path | Description |
|---|---|---|
| GET | /users | List users |
| POST | /users | Create a user |
- Markdown (GFM) — small, simple tables
wc-table— JSON-driven data with sticky headerswc-asciidoc-table— hand-authored tables with spans, column specs, multi-line cells, or CSV/DSV
Implicit header row
If every cell of the first row is on the line right after |===, and the next line is blank, that row becomes the header automatically:
| Name | Role | Team |
|---|---|---|
| Ada | Engineer | Platform |
| Grace | Admiral | Navy |
You can also set the header explicitly with options="header" or %header in the attribute list.
Column specs
Use cols to set column count, relative widths, default alignment, and default cell style:
| Wide | Narrow | Widest |
|---|---|---|
| Left content | Mid | More detail on the right |
Multipliers and alignment
| Spec | Meaning |
|---|---|
3* | Three equal columns |
2,3* | One column width 2, then three equal columns |
> / < / ^ | Right / left / center horizontal align |
.> / .< / .^ | Bottom / top / middle vertical align |
s e m h l a | Strong, emphasis, mono, header, literal, AsciiDoc cell |
~ | Autowidth column |
| Right + strong | Center | Center | Center |
|---|---|---|---|
| Emphasis | a | b | c |
Cell spans, styles, and alignment
Put operators immediately before the cell separator (|):
| Feature | Notes |
|---|---|
| Spans both columns | |
| Right aligned | Aligned to the right |
| Strong | Bold cell text |
| Monospace | GET /v1/items |
| Emphasis | Italic cell text |
Span operators
| Operator | Effect |
|---|---|
2+| | Span 2 columns |
.2+| | Span 2 rows |
2.2+| | Span 2 columns and 2 rows |
3*| | Repeat the cell across 3 columns |
| A | B | C |
|---|---|---|
| Block span | Row 1 Col 3 | |
| Row 2 Col 3 | ||
| D | E | F |
Titles, footer, and layout attributes
Add a block title with a leading . line. Promote the last row to a footer with options="footer":
| Method | Path |
|---|---|
| GET | /users |
| POST | /users |
| Total | 2 |
Table attributes
You can set these on the tag or in the AsciiDoc attribute list ([...]):
1,2,3 or 3*).|).CSV, DSV, and TSV
Set format="csv" (or use the ,=== shorthand delimiter) for comma-separated data:
| Method | Path | Description |
|---|---|---|
| GET | /health | Liveness probe |
| POST | /deploy | Trigger deploy |
Quoted CSV fields can contain commas:
| Last, First | Role |
|---|---|
| Hopper, Grace | Admiral |
Use format="dsv" (or :===) for colon-separated values, and format="tsv" for tabs.
Escaping pipes
If a PSV cell must contain |, escape it with a backslash or use {vbar}:
| The default separator is | | Also written as | |
Or change the separator entirely:
MDX-style tag
The MDX bridge also accepts PascalCase:
What's next
- Compare with JSON tables in Data display
- Review GFM Markdown tables in Markdown basics
- Browse the full AsciiDoc table reference at docs.asciidoctor.org