How to Make Tables in Markdown
Learn Markdown table syntax, alignment, escaping, renderer differences and accessible alternatives with copyable worked examples.
A Markdown table needs a header row, a delimiter row and one or more data rows. Tables are a widely supported extension—especially in GitHub-Flavoured Markdown—but they are not part of the smallest CommonMark core.
Start with the smallest table
| Product | Price |\n| --- | ---: |\n| Basic | £9 |\n| Plus | £19 |The first line contains headings. The second uses hyphens to separate the header, and each later line is a row. Outer pipes improve readability but some renderers do not require them.
Align columns
| Name | Status | Amount |\n| :--- | :---: | ---: |\n| Alpha | Open | £12.50 |A colon on the left requests left alignment, colons on both sides request centre alignment, and a colon on the right requests right alignment. Alignment is presentational; it does not turn text into a numeric data type.
Escape pipes inside cells
A literal vertical bar can be mistaken for a column separator. In renderers that support it, write \|. Always preview inline code containing a pipe because parsers differ in how they combine code spans and table escaping.
Line breaks and rich cells
Portable Markdown tables do not reliably support multiline cells, merged cells, multiple header tiers or formulas. A destination may accept <br>, but that is an HTML extension. When the information matters, restructure it into separate rows, a list or prose rather than hiding loss.
Build a table without typing syntax
Use the Markdown Table Generator to create headings and rows, then the formatter to make existing syntax consistent. For spreadsheet data, the CSV converter handles quoted commas and escaped pipes locally in your browser.
Accessibility checklist
- Use short, meaningful column headings.
- Do not encode meaning using alignment or colour alone.
- Avoid very wide tables that require horizontal scanning.
- Introduce the table in prose and explain abbreviations.
- Provide a list or prose alternative when the structure is complex.
Renderer compatibility
Preview in the system that will publish the document. GitHub documents its table extension in the GitHub-Flavoured Markdown specification; CommonMark defines the portable core but not pipe tables. A preview in one editor is not proof that another will render identically.