Skip to content

Basic Table

The extension supports the standard MultiMarkdown table syntax. A table requires at least one header row, a separator row made of dashes (-), and one or more body rows.

Without surrounding pipes

Pipes at the beginning and end of each row are optional.

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell
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>

With surrounding pipes

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |
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>

Single column

| Head |
| ---- |
| Data |
| More |
Head
Data
More
<table>
<thead>
<tr>
<th>Head</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data</td>
</tr>
<tr>
<td>More</td>
</tr>
</tbody>
</table>

Escaped pipes

A pipe preceded by a backslash (\|) is treated as a literal character, not a column separator.

| Expression | Result  |
| ---------- | ------- |
| `a \| b`   | a \| b  |
Expression Result
a \| b a | b
<table>
<thead>
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>a \| b</code></td>
<td>a | b</td>
</tr>
</tbody>
</table>

Pipe inside a code span

A pipe inside a backtick code span is not treated as a column separator.

| Name | Expression |
| ---- | ---------- |
| or   | `a\|b`     |
Name Expression
or a\|b
<table>
<thead>
<tr>
<th>Name</th>
<th>Expression</th>
</tr>
</thead>
<tbody>
<tr>
<td>or</td>
<td><code>a\|b</code></td>
</tr>
</tbody>
</table>

Equal signs in the separator

The separator row also accepts = signs instead of -.

First Header  | Second Header
============= | =============
Content Cell  | Content Cell
First Header Second Header
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>
</tbody>
</table>