You paste a small table into a README, open the preview, and something looks off. The names read fine, but the numbers sit flush against the left edge like ordinary sentences, so a column of figures refuses to line up and comparing two values takes real effort. The cells are not the problem. Alignment in a Markdown table is decided by one row most people never look at: the separator row directly under the header, the line of dashes and colons. Three short patterns in that row control whether each column renders left, center or right. This guide explains the three patterns, matches each one to the content it suits, and shows how to set them with the Markdown Table Generator on Ovatly, which writes the separator row for you.
Contents
- Quick answer
- The row that runs the table
- The three separator patterns
- Which alignment suits which content
- How to set alignment, step by step
- Worked example: names left, ages right
- Limitations
- Common mistakes
- FAQs
- Conclusion
Quick answer
Alignment is written into the separator row, one segment per column. A segment of :--- left-aligns its column, :---: centers it, and ---: right-aligns it. Set the pattern column by column: prose reads best left-aligned, numbers read best right-aligned because their digits line up by place value, and short labels often sit well centered. In the Markdown Table Generator, you choose an alignment for each column in the grid editor and the tool writes the matching separator row into the Markdown it generates.
The row that runs the table
A Markdown table has three parts. The header row names the columns. The body rows carry the data. Between them sits the separator row, a row of dash segments divided by pipes, one segment for each column. Readers skim past it because it holds no information they want, but renderers read it closely: each segment tells the renderer how to position the content of the column above it.
That placement is the whole trick. The colons are not decoration and they are not part of the data. Move a colon from one end of a segment to the other and the column flips sides, while every header and cell stays exactly as it was. Once you see the separator row as a row of per-column instructions, hand-written tables stop being mysterious: when a rendered table aligns badly, the separator row is the first place to look.
The three separator patterns
Here is one small table using all three patterns at once. The separator row reads left, center, right across its three columns:
| Item | Status | Price |
| :--- | :---: | ---: |
| Notebook | In stock | 4 |
| Desk lamp | Low stock | 27 |
Read the separator row segment by segment. The first segment, :---, starts with a colon, so the Item column hugs the left edge. The second, :---:, carries a colon at both ends, so Status sits in the middle of its column. The third, ---:, ends with a colon, so Price is pushed to the right edge, which is where figures belong. A segment with no colon at all gives the renderer no alignment instruction of its own. The dashes themselves only need to be present; the colons carry the meaning.
Which alignment suits which content
Left alignment is the default readers expect for words. Text of uneven length looks natural starting at a shared left edge, and the ragged right edge helps the eye track from line to line. Names, descriptions and notes all belong here.
Right alignment exists for numbers. When figures end at the same edge, their digits stack by place value: units over units, tens over tens. A column of prices, ages or counts right-aligned can be scanned and compared in seconds. The same figures left-aligned force the reader to work out where each number ends before comparing anything.
Center alignment suits short, even content: status words, yes or no answers, ratings, a column of single letters. Centering long text is a mistake, because lines of very different lengths starting at different points are hard to read. Used on brief labels, centering gives a table a tidy, deliberate look.
How to set alignment, step by step
- Open the Markdown Table Generator and edit the header cells in the grid.
- Choose an alignment for each column while you work: left for text columns, right for numeric ones, center for short labels.
- Fill in the body cells, using the Add row and Add column buttons when the table needs to grow.
- Watch the generated Markdown below the grid. The separator row updates to match the alignments you picked, with the colon patterns written out for you.
- Copy the finished Markdown into your README, issue or document.
Worked example: names left, ages right
Take a two-column people table with headers Name and Age, alignment left for Name and right for Age, and rows Ada, 36 and Grace, 85. The generator produces exactly this:
| Name | Age |
| :--- | ---: |
| Ada | 36 |
| Grace | 85 |
The separator row shows the pairing plainly: :--- under Name keeps the names at the left edge, and ---: under Age pushes both figures to the right, so 36 and 85 line up by place value even though they are different ages with different digits. Nothing about the data changed when the alignment was set. Only the separator row carries the instruction, and copying this block into any document that renders GitHub-flavored Markdown reproduces the same layout.
Limitations
Alignment markers are part of the widely supported GitHub-flavored table syntax, but support is not universal in detail: a few minimal renderers ignore alignment while still showing the table, so never let alignment carry meaning on its own. If a column must be read as the largest figure, say so in words rather than relying on position.
Markdown tables themselves are plain by design. They cannot do merged cells or multi-line content, and cells hold no rich formatting beyond basic inline Markdown. Alignment does not change that; it positions simple content, nothing more.
Common mistakes
- Putting the colon on the wrong end.
:---and---:look similar at a glance and do opposite jobs. Check which edge the numbers sit on in the preview. - Left-aligning figures out of habit. A numeric column left at the default wastes the one scanning aid tables offer. Right-align it.
- Centering paragraphs. Center works for labels of a few characters. Centered sentences with ragged starts on both sides slow readers down.
- Expecting alignment to fix ragged source. The rendered position comes from the separator row, not from padding spaces in your source lines. Neat source is pleasant to edit, but it is the colons that render.
FAQs
What do the colons in a Markdown table separator row mean? A colon at the left end of the dashes means left alignment, colons at both ends mean center alignment, and a colon at the right end means right alignment. Each segment of the separator row controls the one column directly above it.
Which alignment should numbers use? Right alignment. When figures sit against the right edge, their digits line up by place value, so 36 and 85 are easy to compare at a glance. Left-aligned numbers bury that pattern because each figure starts at the same edge but ends at a different one.
Can each column in one table have a different alignment? Yes. Alignment is a per-column setting carried by the separator row, so a table can pair a left-aligned name column with a right-aligned age column, which is exactly what the worked example in this guide does.
Do all Markdown renderers show alignment the same way? Alignment markers are part of the widely supported GitHub-flavored table syntax. A few minimal renderers ignore alignment but still show the table, so the data survives even where the positioning does not.
Does alignment change the cell content? No. The instruction sits in the separator row, not in the cells. The text and numbers stay exactly as written; only where they sit inside their column changes when the table renders.
Conclusion
Three patterns, one per column, all written in the separator row: :--- for left, :---: for center, ---: for right. Match them to the content, prose left and figures right, and a table becomes something a reader can scan instead of decode. When a hand-written table breaks instead of merely aligning badly, the companion guide on common Markdown table mistakes that break rendering covers the failures that stop a table rendering at all. For more tools in this group, browse the Developer Tools guides.