Skip to content

Markdown Table Extension

Yaoxing edited this page Jul 19, 2026 · 1 revision

Markdown pipe tables support a {width} spec on header cells to set column widths in generated HTML and PDF output:

| Name{120} | Description{*} | Status{50%} |
| --------- | -------------- | ----------- |
| foo       | bar            | active      |
Spec Meaning Example HTML
{N} CSS width — bare numbers default to pixels <col style="width:120px" ...>
{Npx} Explicit pixels <col style="width:120px" ...>
{N%} Percentage of the table width <col style="width:50%" ...>
{Nunit} Any valid CSS unit (em, rem, vw, …) <col style="width:10em">
{*} Auto (no constraint) <col />

The spec is stripped from the rendered header text and a <colgroup> of <col> elements is inserted into the <table>. Columns without a {width} spec are left unconstrained.

Clone this wiki locally