Tables are used to show some data in a two-dimensional fashion. In zettelmarkup, tables are not specified explicitly, but by entering table rows. Therefore, a table can be seen as a sequence of table rows. A table row is nothing but a sequence of table cells. The length of a table is the number of table rows, the width of a table is the maximum length of its rows.

The first cell of a row must begin with the vertical bar character (“|”, U+007C) at the first position of a line. The other cells of a row begin with the same vertical bar character at later positions in that line. A cell is delimited by the vertical bar character of the next cell or by the end of the current line. A vertical bar character as the last character of a line will not result in a table cell. It will be ignored. Inside a cell, you can specify any inline elements.

For example:

| a1 | a2 | a3|
| b1 | b2 | b3
| c1 | c2

will be rendered in HTML as:

a1a2a3
b1b2b3
c1c2

Header row

If any cell in the first row of a table contains an equal sing character (“=”, U+003D) as the very first character, then this first row will be interpreted as a table header row.

For example:

| a1 | a2 |= a3|
| b1 | b2 | b3
| c1 | c2

will be rendered in HTML as:

a1a2a3
b1b2b3
c1c2

Column alignment

Inside a header row, you can specify the alignment of each header cell by a given character as the last character of a cell. The alignment of a header cell determines the alignment of every cell in the same column. The following characters specify the alignment:

If no alignment character is given, a default alignment is used.

For example:

|=Left<|Right>|Center:|Default
|123456|123456|123456|123456|
|123|123|123|123

will be rendered in HTML as:

LeftRightCenterDefault
123456123456123456123456
123123123123

Cell alignment

To specify the alignment of an individual cell, you can enter these characters for alignment as the first character of that cell.

For example:

|=Left<|Right>|Center:|Default
|>R|:C|<L
|123456|123456|123456|123456|
|123|123|123|123

will be rendered in HTML as:

LeftRightCenterDefault
RCL
123456123456123456123456
123123123123

Rows to be ignored

A line that begins with the sequence |% (vertical bar character (“|”, U+007C), followed by a percent sign character (“%”, U+0025)) will be ignored. For example, this allows to specify a horizontal rule that is not rendered. Such tables are emitted by some commands of the administrator console. For example, the command get-config box will emit:

|=Key        | Value  | Description
|%-----------+--------+---------------------------
| defdirtype | notify | Default directory box type

This is rendered in HTML as:

KeyValueDescription
defdirtypenotifyDefault directory box type