The three parts of a Markdown table
A Markdown table is a header row, a separator row, and body rows. Each row is written on one line with cells separated by pipe characters. The separator row — the dashes — tells the renderer that the lines above and below it form a table. Without it, the pipes are shown as literal text and nothing renders.
- | Name | Role |
- | --- | --- |
- | Ada | Engineer |
- | Grace | Admiral |
Why the separator row matters
The dashes are not decoration — they are the signal that switches the renderer into table mode. They must appear on the line immediately below the header, with the same number of cells, and they need at least three dashes per column (one dash is technically accepted by some renderers, but three is the safe, portable choice).
Aligning columns
You can align a column by placing a colon in its separator cell: a left colon aligns left, a right colon aligns right, and colons on both sides centre the column. Alignment is a hint — some renderers ignore it — but the major ones honour it. Without colons, columns default to left alignment.
- | Left | Centre | Right |
- | :--- | :---: | ---: |
- | a | b | c |
Formatting inside cells
Cells can contain inline Markdown: bold, italic and inline code all work. What you cannot easily do is put a block element — a list, a heading or a multi-line paragraph — inside a table cell. If a cell needs that much content, the data probably belongs in a list or a separate section rather than a table.
Common mistakes that break tables
- Missing the separator row, so the pipes render as text
- A body row with fewer cells than the header, which stops the table drawing
- A raw pipe character inside a cell, which splits the cell in two
- Blank lines between body rows, which can split one table into several
- Leading or trailing spaces that misalign the source, though renderers ignore them
Generate instead of hand-writing
For anything beyond a two-column table, hand-writing pipes is slow and error-prone. Paste your data from a spreadsheet or CSV into the table generator and it emits a correctly formed table — header, separator and padded rows — that you can paste straight into your document. This sidesteps every mistake listed above.