Markdown tables
A table is rows of cells separated by pipes, with a line of dashes under the header row. Tables are a GitHub-flavoured extension, not original markdown, but support is close to universal now.
| Element | Support |
|---|---|
| Tables | GitHub-flavoured |
| Task lists | Yes |
| Left | Centre | Right |
|---|---|---|
| a | b | 1,00 |
| Item | Notes |
|---|---|
| One | first line second line |
`<br>` is the only way. Two trailing spaces do nothing inside a table.
What usually goes wrong
- The dashed line under the header is required. Without it there is no table, just lines with pipes in them.
- A pipe inside a cell has to be escaped as
\|, or it starts a new column. This bites when a cell contains code with a pipe in it. - The outer pipes are optional and the columns do not have to line up in the source. Lining them up costs nothing and makes the raw file readable, which is half the point of markdown.
- Tables cannot contain paragraphs, lists or fenced code blocks. If you need those, use HTML or restructure.
Where it behaves differently
It renders as written on GitHub, GitLab, Obsidian and VS Code preview. Everywhere else in this table it does something else, and that is worth reading before you paste.
| Platform | Behaviour |
|---|---|
| Notion | Not supported. The syntax arrives as its own punctuation. |
| Discord | Not supported. The syntax arrives as its own punctuation. |
| Slack | Not supported. The syntax arrives as its own punctuation. |
Questions
How do I make a table in markdown quickly?
Paste your data into the CSV or Excel converter on this site and copy the result. Building a table by hand is fine for three rows and miserable for thirty.
For the .md file that arrives in Mail
A markdown file on a phone is the worst case: no editor, no preview, and a share sheet full of apps that want to import it into a library. The iPhone and iPad app opens it where it landed, renders it, and lets you edit and save it back.
For iPhone and iPad.