Skip to content

Row Spanning

Optional feature

Row spanning requires rowspan: true in your configuration.

markdown_extensions:
  - pymdown_multimd_table:
      rowspan: true

Place ^^ in a body cell to merge it upward with the cell directly above. Consecutive ^^ markers keep extending the rowspan.

Simple rowspan

| A      | B  | C  |
| :----- | :- | :- |
| tall   | 1  | x  |
| ^^     | 2  | y  |
A B C
tall 1 x
2 y
<table>
<thead>
<tr>
<th style="text-align:left">A</th>
<th style="text-align:left">B</th>
<th style="text-align:left">C</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2" style="text-align:left">tall</td>
<td style="text-align:left">1</td>
<td style="text-align:left">x</td>
</tr>
<tr>
<td style="text-align:left">2</td>
<td style="text-align:left">y</td>
</tr>
</tbody>
</table>

Three-row span

| A      | B  |
| :----- | :- |
| big    | 1  |
| ^^     | 2  |
| ^^     | 3  |
A B
big 1
2
3
<table>
<thead>
<tr>
<th style="text-align:left">A</th>
<th style="text-align:left">B</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="3" style="text-align:left">big</td>
<td style="text-align:left">1</td>
</tr>
<tr>
<td style="text-align:left">2</td>
</tr>
<tr>
<td style="text-align:left">3</td>
</tr>
</tbody>
</table>

Rowspan and colspan combined

| A ||  |
| --- | --- | --- |
| B  | C  | D  |
| ^^ | E  | F  |
| G  || H  |
| ^^ || I  |
| ^^ || J  |
A
B C D
E F
G H
I
J
<table>
<thead>
<tr>
<th colspan="2">A</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2">B</td>
<td>C</td>
<td>D</td>
</tr>
<tr>
<td>E</td>
<td>F</td>
</tr>
<tr>
<td colspan="2" rowspan="3">G</td>
<td>H</td>
</tr>
<tr>
<td>I</td>
</tr>
<tr>
<td>J</td>
</tr>
</tbody>
</table>

Notes

  • ^^ is only recognised in body rows. In a header row it is treated as literal text.
  • With rowspan: false (the default), ^^ is rendered as literal cell content.