Markdown Table Merge Cells

Learn how to create tables with merged cells in Markdown

Select cells, merge them, copy the table — runs in your browser.

Merge cells

4 × 4 table2 merged cells1 × 1 selected

Table

Drag across cells or Shift+click to select a block. With the keyboard, press Esc in a cell, then Shift+arrow keys. On a touch screen, turn on Select cells, then tap two cells to select the block between them. Selected: 1 × 1.

Output

Paste into a README or any Markdown file. Merged cells render on GitHub, GitLab, Obsidian and in VS Code.

Preview
Team Q1 Q2 Status
Design 12 15 On track
Engineering 30 28
Total 85
Merged in your browser · 0 bytes uploaded4 rows × 4 columns2 mergedtable.htmlGuide

Important Note

Standard Markdown does not support merged cells (colspan/rowspan). To merge cells, you need to use HTML tables within your Markdown document.

How to Merge Cells in Markdown Tables

Since standard Markdown doesn't support cell merging, you have two options:

Option 1: Use HTML Tables

HTML tables work in most Markdown renderers (GitHub, GitLab, etc.):

<table>
  <tr>
    <td colspan="2">Merged across 2 columns</td>
  </tr>
  <tr>
    <td rowspan="2">Merged 2 rows</td>
    <td>Cell</td>
  </tr>
  <tr>
    <td>Cell</td>
  </tr>
</table>

Option 2: Restructure Your Data

Sometimes you can avoid merged cells by reorganizing your content:

  • Use multiple tables instead of one
  • Add descriptive headers
  • Use nested lists for hierarchical data

HTML Merge Attributes

  • colspan="n" - Merge n columns horizontally
  • rowspan="n" - Merge n rows vertically