Tables

Tables in MMX are written as rows of |-separated values inside a #table ... #endtable block. The first argument after #table controls how the header cells are rendered.

Basic syntax

#table [mode] [optional classes]
header|cell|cell
row   |cell|cell
#endtable

The full source of the examples below is also available as a file at assets/code/tableExamples.txt.


Examples

Vertical table (default)

The first column is rendered as a header on the left, the rest as data cells.

NameScoreState
Alice95Pass
Bob87Pass

Horizontal table

The first row is rendered as a header on top, the rest as data rows.

NameScoreState
Alice95Pass
Bob87Pass

Both sides table

Both the first row and the first column become headers. The leading space in the first line is optional -- it is kept only for readability.

 NameScore
YesterdayAlice95
TodayBob87

Undefined mode

If you omit the mode, the table is treated as a vertical table.

TitleDescription
Item 1Text
Item 2More text

Notes

Note:

Inside a table cell, the inline patterns of MMX still work -- you can use bold, italic, inline code, links and even inline images.

Note:

A table with zero data rows renders as an empty <table>. The header row is always present when the mode is h or b.