Markdown tables
A Markdown table is rows of text with a pipe | between columns and a separator row of dashes under the header. Tables are part of GitHub Flavored Markdown (GFM), not the original Markdown, but nearly every current editor and converter supports them.
| Task | Owner | Due |
| ------------- | ----- | ------ |
| Draft outline | Mia | Mon |
| Review | Sam | Wed |
That renders as a three-column table with a bold header row.
What are the rules for a valid table?
A table needs a header row, a separator row, and pipes between cells. The separator row must have one cell of dashes for every header cell, or the whole block stays plain text. Three dashes per cell is the common convention.
- The leading and trailing pipes are optional, but keeping them makes the source easier to read.
- Columns do not need to line up in the source.
|a|b|and a neatly padded row render the same. - A row with fewer cells than the header gets empty cells. Extra cells are dropped.
- A blank line ends the table.
How do you align columns?
Put a colon in the separator row: on the left for left alignment, on both sides for center, on the right for right alignment. Without colons, the renderer decides, which usually means left.
| Item | Qty | Price |
| :------ | :-: | ----: |
| Pencils | 12 | 3.00 |
| Paper | 1 | 11.50 |
Right alignment is the usual choice for numbers so the digits line up.
How do you put a pipe or a line break inside a cell?
Escape a literal pipe with a backslash: \|. A cell cannot hold a real line break in GFM, so most people use <br> where HTML is allowed, or split the content into two rows.
| Command | Meaning |
| ------------ | ---------------- |
| `a \| b` | pipe a into b |
Inline formatting works inside cells: **bold**, *italic*, `code` and links.
What can a Markdown table not do?
GFM tables have no merged cells, no row spans, no captions and no multi-line cells. If a table needs any of those, write it in HTML inside the Markdown file or keep the table in a spreadsheet and link to it.
Tables in Noteline
Noteline renders GFM tables as you type and lets you edit a cell in place, so you do not have to keep the pipes lined up by hand. Insert a new table with Cmd+Option+T on a Mac or Ctrl+Alt+T on Windows and Linux, or by typing /table and pressing Enter. The file still stores the plain pipe syntax shown above, so the table opens the same way in any other Markdown app.
Common questions
Do Markdown tables need a header row?
Yes. GFM only recognizes a table when the first row is followed by a separator row of dashes. Empty header cells are allowed, but the header row still shows.
Can I make a table without the outer pipes?
Yes. Name | Role with --- | --- under it is a valid table. The outer pipes only make the source easier to scan.
Why is my Markdown table showing as plain text?
The usual causes are a missing separator row, a separator row with a different number of cells than the header, or a missing blank line between the paragraph above and the table.