---
desc: Standard defined in MultiMarkdown 5
---


Simplest table, without leading or trailing pipes
.
First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell
.
<table>
<thead>
<tr>
<th>First Header</th>
<th>Second Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
</tbody>
</table>
.


Simplest table, with both leading and trailing pipes
.
| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |
.
<table>
<thead>
<tr>
<th>First Header</th>
<th>Second Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
<tr>
<td>Content Cell</td>
<td>Content Cell</td>
</tr>
</tbody>
</table>
.


Center-aligned and right-aligned separators
.
| Item      | Value |
| :-------: | -----:|
| Computer  | $1600 |
| Phone     |   $12 |
| Pipe      |    $1 |
.
<table>
<thead>
<tr>
<th style="text-align:center">Item</th>
<th style="text-align:right">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">Computer</td>
<td style="text-align:right">$1600</td>
</tr>
<tr>
<td style="text-align:center">Phone</td>
<td style="text-align:right">$12</td>
</tr>
<tr>
<td style="text-align:center">Pipe</td>
<td style="text-align:right">$1</td>
</tr>
</tbody>
</table>
.


Inline formatting such as code, strong tags
.
| Function name | Description                    |
| ------------- | ------------------------------ |
| `help()`      | Display the help window.       |
| `destroy()`   | **Destroy your computer!**     |
.
<table>
<thead>
<tr>
<th>Function name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>help()</code></td>
<td>Display the help window.</td>
</tr>
<tr>
<td><code>destroy()</code></td>
<td><strong>Destroy your computer!</strong></td>
</tr>
</tbody>
</table>
.


> Requirement 1: There must be at least one | per line


No valid pipes (escaped or fenced) at last line
.
First Header  | Second Header | Third Header |
------------  | :-----------: | -----------: |
Content      \|   **Cell**   \`         Cell |
New section  \|     More     `|`        Data\|
.
<table>
<thead>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content      |   <strong>Cell</strong>   `         Cell</td>
</tr>
</tbody>
</table>
<p>New section  |     More     <code>|</code>        Data|</p>
.


No valid pipes (escaped or fenced) at first line
.
First Header \| Second Header`|`Third Header\|
------------  | :-----------: | -----------: |
Content       |   **Cell**    |         Cell |
New section   |      More     |        Data  |
.
<p>First Header | Second Header<code>|</code>Third Header|
------------  | :-----------: | -----------: |
Content       |   <strong>Cell</strong>    |         Cell |
New section   |      More     |        Data  |</p>
.


> Requirement 2: The “separator” line between headers and table content must contain only |,-, =, :,., +, or spaces
> Comment: No implementation details on how to denote wrappable, so here it follows MultiMarkdown-5 `extend` class


Equal signs in center-aligned separator
.
First Header  | Second Header | Third Header |
============  | :===========: | ===========: |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<table>
<thead>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
<tr>
<td>New section</td>
<td style="text-align:center">More</td>
<td style="text-align:right">Data</td>
</tr>
</tbody>
</table>
.


Wrappable notation in simple separator
.
First Header  | Second Header | Third Header |
------------  | ------------+ | ------------ |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<table>
<thead>
<tr>
<th>First Header</th>
<th class="extend">Second Header</th>
<th>Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td class="extend"><strong>Cell</strong></td>
<td>Cell</td>
</tr>
<tr>
<td>New section</td>
<td class="extend">More</td>
<td>Data</td>
</tr>
</tbody>
</table>
.


Wrappable notation in center-aligned equal-signed separator
.
First Header  | Second Header | Third Header |
============  | :==========:+ | -----------: |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<table>
<thead>
<tr>
<th>First Header</th>
<th style="text-align:center" class="extend">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" class="extend"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
<tr>
<td>New section</td>
<td style="text-align:center" class="extend">More</td>
<td style="text-align:right">Data</td>
</tr>
</tbody>
</table>
.


Invalid characters in separator
.
|             |   Grouping    |              |
------------  | ------------- | -----------* |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<p>|             |   Grouping    |              |
------------  | ------------- | -----------* |
Content       |   <strong>Cell</strong>    |         Cell |
New section   |     More      |         Data |</p>
.

> Requirement 3: Cell content must be on one line only
> Requirement 4: Columns are separated by |
> Requirement 5: The first line of the table, and the alignment/divider line, must start at the beginning of the line


Multiple table headers and one possible separator
.
|             |   Grouping    |              |
|             |               |  Grouping 2  |
First Header  | Second Header | Third Header |
------------  | :-----------: | -----------: |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center">Grouping</th>
<th style="text-align:right"></th>
</tr>
<tr>
<th></th>
<th style="text-align:center"></th>
<th style="text-align:right">Grouping 2</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
<tr>
<td>New section</td>
<td style="text-align:center">More</td>
<td style="text-align:right">Data</td>
</tr>
</tbody>
</table>
.


Multiple table headers and multiple possible separators
.
|             |   Grouping    |              |
|             |               |  Grouping 2  |
First Header  | Second Header | Third Header |
------------  | :-----------: | -----------: |
------------  | ------------: | ------------ |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center">Grouping</th>
<th style="text-align:right"></th>
</tr>
<tr>
<th></th>
<th style="text-align:center"></th>
<th style="text-align:right">Grouping 2</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>------------</td>
<td style="text-align:center">------------:</td>
<td style="text-align:right">------------</td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
<tr>
<td>New section</td>
<td style="text-align:center">More</td>
<td style="text-align:right">Data</td>
</tr>
</tbody>
</table>
.


Multiple table headers but no possible separator
.
|             |   Grouping    |              |
|             |               |  Grouping 2  |
First Header  | Second Header | Third Header |
------------  | ------------- | -----------* |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<p>|             |   Grouping    |              |
|             |               |  Grouping 2  |
First Header  | Second Header | Third Header |
------------  | ------------- | -----------* |
Content       |   <strong>Cell</strong>    |         Cell |
New section   |     More      |         Data |</p>
.


> Note 1: It is optional whether you have | characters at the beginning and end of lines.
> Note 2: The “separator” line uses `----` or `====` to indicate the line between a header and cell. The length of the line doesn’t matter, but must have at least one character per cell.


Invalid separator for containing no minus or equal signs
.
First Header  | Second Header | Third Header |
============  | ::+           | -----------: |
Content       |   **Cell**    |         Cell |
New section   |     More      |         Data |
.
<p>First Header  | Second Header | Third Header |
============  | ::+           | -----------: |
Content       |   <strong>Cell</strong>    |         Cell |
New section   |     More      |         Data |</p>
.


> Note 3: To set alignment, you can use a colon to designate left or right alignment, or a colon at each end to designate center alignment, as above. If no colon is present, the default alignment of your system is selected (left in most cases). If the separator line ends with +, then cells in that column will be wrapped when exporting to LaTeX if they are long enough.
> Note 4: To indicate that a cell should span multiple columns, then simply add additional pipes (`|`) at the end of the cell, as shown in the example. If the cell in question is at the end of the row, then of course that means that pipes are not optional at the end of that row…. The number of pipes equals the number of columns the cell should span.


Multiple columns spanned, without leading pipes
.
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |
.
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
</table>
.


Multiple columns spanned, with some leading pipes
.
|             |          Grouping           ||
 ------------ | :-----------: | -----------: |
|          *Long Cell*       ||
|                                          |||         Cell |
.
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td colspan="3"></td>
<td>Cell</td>
</tr>
</tbody>
</table>
.


> Note 5: You can use normal Markdown markup within the table cells.
> Note 6: Captions are optional, but if present must be at the beginning of the line immediately preceding or following the table, start with `[`, and end with `]`. If you have a caption before and after the table, only the first match will be used.


Caption recognized prior to table row
.
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |
[             |               |              ]
.
<table>
<caption id="" style="caption-side: bottom">             |               |              </caption>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
</table>
.


Prefer caption at first line than that at last line
.
[Prototype table]
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |
[Prototype table caption]
.
<table>
<caption id="prototypetable">Prototype table</caption>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
</table>
<p>[Prototype table caption]</p>
.


> Note 7: If you have a caption, you can also have a label, allowing you to create anchors pointing to the table. If there is no label, then the caption acts as the label


Caption with label appended
.
[Prototype table][label1]
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |
[Prototype table caption][label2]
.
<table>
<caption id="label1">Prototype table</caption>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
</table>
<p>[Prototype table caption][label2]</p>
.


> Note 8: Cells can be empty. Assumed must with pipe characters on its both side


Empty table cells at headers and data rows
.
|             |                             ||
|             | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |                             ||
|             |               |         Cell |
[Prototype table]
.
<table>
<caption id="prototypetable" style="caption-side: bottom">Prototype table</caption>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2"></th>
</tr>
<tr>
<th></th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"></td>
</tr>
<tr>
<td></td>
<td style="text-align:center"></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
</table>
.


> Note 9: You can create multiple <tbody> tags (for HTML) within a table by having a single empty line between rows of the table. This allows your CSS to place horizontal borders to emphasize different sections of the table. This feature doesn’t work in all output formats (e.g. RTF and OpenDocument).

Empty line to divide two table body
.
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |

New section   |     More      |         Data |
And more      | With an escaped '\|'         ||
[Prototype table]
.
<table>
<caption id="prototypetable" style="caption-side: bottom">Prototype table</caption>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
<tbody>
<tr>
<td>New section</td>
<td style="text-align:center">More</td>
<td style="text-align:right">Data</td>
</tr>
<tr>
<td>And more</td>
<td style="text-align:center" colspan="2">With an escaped '|'</td>
</tr>
</tbody>
</table>
.


Empty line disallowed between separator and data rows
.
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |

Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |

New section   |     More      |         Data |
And more      | With an escaped '\|'         ||
[Prototype table]
.
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
</table>
<p>Content       |          <em>Long Cell</em>        ||
Content       |   <strong>Cell</strong>    |         Cell |</p>
<p>New section   |     More      |         Data |
And more      | With an escaped '|'         ||
[Prototype table]</p>
.


Multiple empty lines to end the table
.
|             |          Grouping           ||
First Header  | Second Header | Third Header |
 ------------ | :-----------: | -----------: |
Content       |          *Long Cell*        ||
Content       |   **Cell**    |         Cell |


New section   |     More      |         Data |
And more      | With an escaped '\|'         ||
[Prototype table]
.
<table>
<thead>
<tr>
<th></th>
<th style="text-align:center" colspan="2">Grouping</th>
</tr>
<tr>
<th>First Header</th>
<th style="text-align:center">Second Header</th>
<th style="text-align:right">Third Header</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content</td>
<td style="text-align:center" colspan="2"><em>Long Cell</em></td>
</tr>
<tr>
<td>Content</td>
<td style="text-align:center"><strong>Cell</strong></td>
<td style="text-align:right">Cell</td>
</tr>
</tbody>
</table>
<p>New section   |     More      |         Data |
And more      | With an escaped '|'         ||
[Prototype table]</p>
.
