Markdown Tables in GitHub and Docs
How to create, format, and extend Markdown tables for GitHub READMEs, wikis, and documentation sites.
Published:
Tags: Markdown tables GitHub, GitHub README table, GFM table guide
|:---||:---:||---:|overflow-x: auto<table><tr><td><th><table>:------:---:---:bolditaliccodecodelinktablesmkdocs.ymltablesmarkdownextensionsnpm install remark-gfmremarkPluginsremark-gfm<table>|---:---:---:---:<table>colspanrowspan` attributes inside your Markdown file.
Frequently Asked Questions
How do I create a table in a GitHub README?
GitHub README files render GitHub Flavored Markdown (GFM), which supports pipe-syntax tables. Use `|` to separate columns, a row of `---` to mark the header separator, and fill in rows below. Optionally add colons in the separator row to control alignment.
How do I align columns in a Markdown table?
Add colons to the separator row: `|:---|` for left, `|:---:|` for center, `|---:|` for right. Without colons, the default is left-aligned. The colons don't affect rendering on all platforms but are required for correct alignment on GitHub.
What is the maximum width for a GitHub Markdown table?
GitHub Markdown tables have no fixed maximum column count, but wide tables cause horizontal scrolling on narrow screens. GitHub wraps cell content at roughly 450 pixels total table width. For wide tables, consider splitting into multiple tables or using an HTML table with `overflow-x: auto`.
How do I use HTML tables in Markdown?
Most Markdown renderers including GitHub allow inline HTML. You can use `<table>`, `<tr>`, `<td>`, and `<th>` directly in a .md file for tables that need merging, nested content, or complex styling. HTML tables work in GitHub README, GitLab, and most static site generators.
Can I merge cells in a Markdown table?
Standard Markdown table syntax does not support merged cells (colspan/rowspan). For merged cells, use an HTML table inside the Markdown file — GitHub and most renderers support inline HTML in Markdown documents.
All articles · theproductguy.in