Headerless Markdown Tables & Table Captions
Standard Markdown pipe tables strictly enforce a bold header row at the top of every table. When you only need a clean two-column key-value settings table, a borderless data matrix, or want to attach an official academic caption or figure legend, standard GFM requires specific workarounds.
Quick Reference: Headerless Tables & Captions
| Requirement | Recommended Syntax | Mechanism | Supported On |
|---|---|---|---|
| Empty Header (Markdown) | | | | | Fills header cells with invisible non-breaking spaces | All GFM Parsers |
| True Headerless (HTML) | <table><tbody><tr>... | Omits <thead> entirely for compact key-value lists | GitHub, GitLab, Obsidian |
| Pandoc Table Caption | : Table 1: Model Metrics | Placed immediately below or above table | Pandoc & Quarto |
| Accessible Caption (HTML) | <caption>Title</caption> | Semantic HTML5 table caption for screen readers | 100% Universal |
Method 1: The Empty Header Hack (Pure GFM)
If you want to stay in pure Markdown without writing HTML, you can satisfy the GFM parser by providing non-breaking spaces ( ) in the header row. The parser treats the row as a valid header, but renders no visible text:
| | | | :--- | :--- | | **Project Name** | MarkdownTables Engine | | **Repository** | `github.com/markdowntables/core` | | **Node Version** | `v20.x LTS` or higher | | **License** | MIT Open Source |Rendered Output in GitHub / Browsers
| Project Name | MarkdownTables Engine |
| Repository | github.com/markdowntables/core |
| Node Version | v20.x LTS or higher |
| License | MIT Open Source |
Method 2: True Headerless Tables (HTML <tbody>)
While the hack works in Markdown, browsers may still render an empty 20px header bar at the top of the table. To achieve a true headerless table with zero wasted vertical space, embed an HTML <table> that omits <thead>:
<table>
<tbody>
<tr>
<td><b>Database Host</b></td>
<td><code>db.internal.aws.com:5432</code></td>
</tr>
<tr>
<td><b>Connection Pool</b></td>
<td>20 Max Connections</td>
</tr>
<tr>
<td><b>SSL Mode</b></td>
<td><code>require</code></td>
</tr>
</tbody>
</table>Table Captions, Titles & Source Legends
In formal technical documentation, tables should include an explicit title or caption for reference. Depending on your documentation generator, choose the appropriate syntax:
GitHub / CommonMark Pattern
Place a bold header before the table and an italicized source credit immediately after:
**Table 1: Benchmark Latency by Engine** | Engine | p50 | p99 | | :----- | :-- | :-- | | V1 | 4ms | 18ms | | V2 | 1ms | 3ms | *Source: Internal load testing suite (2026).*
Pandoc / Quarto Native Caption
Prepend a colon : to the line directly following the table:
| Engine | p50 | p99 |
| :----- | :-- | :-- |
| V1 | 4ms | 18ms |
| V2 | 1ms | 3ms |
: Benchmark Latency by Engine {#tbl-latency}Common Pitfalls & Broken vs Fixed Examples
Pitfall 1: Simply Omitting the Header Row in GFM
Platform Compatibility Matrix
| Environment | Support Level | Technical Behavior & Workaround |
|---|---|---|
| GitHub (GFM) | Workaround | Requires header hack for pipe tables; HTML <table> without <thead> works natively. No native : caption syntax. |
| GitLab (GLFM) | Workaround | Identical to GFM; supports HTML <tbody> tables and inline captions. |
| Obsidian | Workaround | Headerless pipe tables require ; Community plugins support table captions. |
| Pandoc | Native Support | Natively supports headerless tables (with extension) and standard table captions (: Caption). |
| MultiMarkdown | Native Support | Supports [Table Caption] syntax and headerless table declarations. |
| VS Code | Workaround | Renders both the header trick and HTML <tbody> tables. |
Frequently Asked Questions
Why does GitHub Flavored Markdown (GFM) require a header row?
In the GFM grammar specification, a table is formally defined by a header row immediately followed by a delimiter row (| --- |). Without the header row, the parser cannot establish column definitions or alignment rules, and will either treat your first row of data as the bold header or fail to render the table entirely.
How do I create a headerless table in pure Markdown without HTML?
Use non-breaking spaces ( ) or empty spaces inside the header row: | | | followed by the delimiter row (| :--- | :--- |). This satisfies GFM syntax while leaving the top header row visually blank.
What is the best way to create a clean key-value table without any top header?
Use a raw HTML <table> containing only a <tbody> and <tr> elements, omitting the <thead> entirely. This prevents browsers from allocating top padding or bold styling to a blank header row.
Does GitHub support table captions (: Caption text)?
No. The colon caption syntax (: Table Caption) is an extension specific to Pandoc and MultiMarkdown. On GitHub, it will render as literal plain text. On GitHub, the standard convention is to place a bold title above the table (**Table 1: User Metrics**) or an italicized description immediately below (*Source: Production Analytics*).
How do I add an accessible caption to a table for screen readers?
Use the semantic HTML <caption> tag inside an HTML <table>: <table><caption>Q2 Performance Summary</caption>...</table>. Screen readers announce the caption when users navigate to the table.
Related Markdown Table Syntax Guides
Align key-value columns with colons (:---).
Merged CellsColspan and rowspan workarounds in tables.
Collapsible TablesWrap key-value settings in <details> toggles.
Create Clean Tables Without Manual Syntax Hacks
Use our visual table editor to generate customized tables, copy clean Markdown, or export directly to HTML.