Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
Practical Markdown Guide

Align Columns in a Markdown Table

In common Markdown pipe-table syntax, put a colon at the left edge of the delimiter to align a column left, at both edges to center it, and at the right edge to align it right. Use `:---` for left, `:---:` for center, and `---:` for right. A delimiter such as `---` normally uses the renderer’s default alignment. This table syntax comes from Markdown extensions, not the original core syntax, so confirm that the target processor supports it.

Use colon markers in the delimiter row

The delimiter row controls alignment in many pipe-table implementations. A table with three alignment choices can look like this: `| Feature | Status | Cost |`, then `| :--- | :---: | ---: |`. The first column is left aligned, the second is centered, and the third is right aligned. The number of dashes is not usually important as long as the delimiter meets the processor’s minimum requirement. Keep the header and body column counts consistent. Escaped pipes are needed when cell content itself includes a literal pipe. Alignment affects rendered cells, not the source text in the Markdown file.

Know the limits of renderer support

Pipe tables are commonly supplied by extensions such as GitHub Flavored Markdown, but Markdown implementations differ. A processor may ignore colons, require a particular delimiter format, or display the pipes as ordinary text because table support is disabled. Some tools convert alignment markers to HTML attributes or CSS classes. Others remove alignment during export. Do not use spacing in the source row to force visual alignment. Browsers collapse ordinary whitespace in HTML table cells, and source spacing does not reliably control the rendered result. Check the final HTML and CSS when alignment matters.

Align for meaning, not decoration

Left alignment generally helps readers scan words. Right alignment makes numbers and decimal values easier to compare. Center alignment can suit short labels, but it often slows reading for long text. The renderer may apply default alignment based on the cell type, and CSS can override the Markdown instruction. A site stylesheet might set `text-align: left` for every cell, or a component may apply its own rules. Test long labels, wrapped values, missing data, negative numbers, currencies, and narrow screens. Make sure color, spacing, and alignment are not the only way readers can distinguish states. A caption or explanatory sentence can define units and abbreviations.

How do you do it step by step?

  1. 1Create the header row and a delimiter row with the same number of columns.
  2. 2Use `:---` for left, `:---:` for center, and `---:` for right alignment.
  3. 3Place numeric or currency columns on the right when comparison benefits from aligned endings.
  4. 4Confirm that the target processor supports pipe tables and preserves alignment in its HTML output.
  5. 5Inspect the rendered table with long content, mobile widths, and the site’s actual CSS.

Working example

This table aligns names left, short states in the center, and amounts right.

Input
| Service | State | Monthly cost |
| :--- | :---: | ---: |
| Storage | Active | $12.00 |
| Backup | Paused | $8.50 |
Result
The Service column is left aligned, State is centered, and Monthly cost is right aligned in renderers that support this table extension.

The source file still shows pipe characters and does not visually align the values. Alignment appears after conversion to HTML or another supported format.

Frequently asked questions

How do I left align a Markdown table column?
Put a colon at the left side of its delimiter, such as `:---`. Some renderers also use left alignment by default.
How do I center a Markdown table column?
Put colons on both sides of the delimiter, such as `:---:`.
How do I right align numbers?
Put a colon at the right side of the delimiter, such as `---:`. This often helps compare numeric endings.
Why does alignment work in one editor but not another?
Pipe tables and their alignment markers are extensions. Different processors may not implement the same rules or may let CSS override them.

Official references