03Days
20HRS
53MINS
19SECS
,

How to Merge Cells in a WordPress Table (Step by Step)

How to merge cells in a WordPress table: a schedule table with merged cells and the Merge cells button

Some tables need a cell that is bigger than the rest. A lunch break that covers every room in a schedule, a category title that sits above a group of menu items, or a header that groups several columns together. In all of these cases you need to merge cells.

In this guide you will learn what merging cells means, when it helps, and how to merge cells in a WordPress table in two ways: with the core WordPress Table block and with WP Table Builder. You will also see a live example and a few tips to keep merged tables easy to read on phones.

What Does It Mean to Merge Cells?

Merging cells means joining two or more neighbouring cells into one larger cell. The new cell takes up the space of all the cells it replaced, so one piece of content can stretch across the table.

Merge cells in a WordPress table: before and after examples of merging across columns (colspan) and down rows (rowspan)
Merging across columns uses colspan. Merging down rows uses rowspan.

There are two directions you can merge in:

  • Across columns (colspan): cells in the same row are joined side by side. Use this for a title or a note that should cover several columns.
  • Down rows (rowspan): cells in the same column are joined from top to bottom. Use this when one item applies to several rows, such as a two hour session in a schedule.
  • Both at once: you can also merge a block of cells, for example two columns by two rows, into one big cell.

Under the hood, HTML tables store this with the colspan and rowspan attributes. A good table plugin writes them for you, so you never have to touch the code.

When Should You Merge Table Cells?

Merged cells are useful when they make the structure of your data clearer. Here are common cases:

  • Schedules and timetables: breaks, keynotes and long sessions that cover several rooms or time slots.
  • Grouped headers: a top header such as “Storage” above two smaller headers like “SSD” and “Backups”.
  • Category rows: section titles in a menu, a price list or a specification table, like the category rows in our restaurant menu table guide.
  • Comparison tables: a single note such as “Included in all plans” that spans every plan column, as in a product comparison table.
  • Summary rows: a total or a final note at the bottom of the table.

Merging is a layout tool, not decoration. If a merged cell does not help readers understand the data faster, leave the cells separate. Too many merged cells make a table harder to scan, sort and read on small screens. Our list of table design mistakes covers more of these layout traps.

Option 1: Merge Cells With the Core WordPress Table Block

The Table block that comes with WordPress can store merged cells, because it supports the colspan and rowspan attributes. However, its toolbar only lets you insert and delete rows and columns. There is no Merge cells button, so you have to write the merged cells yourself in HTML.

The simplest way is to use a Custom HTML block:

  1. Open the post or page in the block editor.
  2. Click the plus (+) button and add a Custom HTML block.
  3. Paste your table code. Add colspan="2" to a cell that should cover two columns, or rowspan="2" to a cell that should cover two rows.
  4. Remove the cells that the merged cell now covers, otherwise the row will have too many cells and the table will break.
  5. Click Preview in the block toolbar to check the result, then update the post.

Here is a small example with one cell merged across two columns and one cell merged down two rows:

<table>
  <tr>
    <th>Time</th>
    <th colspan="2">Sessions</th>
  </tr>
  <tr>
    <td>09:00</td>
    <td colspan="2">Welcome talk (both rooms)</td>
  </tr>
  <tr>
    <td>10:00</td>
    <td>Build your first table</td>
    <td rowspan="2">Pricing table workshop</td>
  </tr>
  <tr>
    <td>11:00</td>
    <td>Tables on phones</td>
  </tr>
</table>

This works, but it has clear limits. You edit code instead of a visual table, the table uses your theme’s default styling, and every later change means counting cells again. There are also no settings for mobile layouts. For anything beyond a small table, a visual builder is much faster.

Option 2: Merge Cells With WP Table Builder

WP Table Builder is a free drag and drop table builder for WordPress. Merging and splitting cells is part of the free plugin, and you do it with two buttons in the builder toolbar. Follow these steps.

Step 1: Create a New Table

In your dashboard, go to WP Table Builder and click Add New. Give the table a name, then start from a blank table with the number of columns and rows you need, or pick a template that is close to your layout.

The WP Table Builder builder with the top bar, the Elements panel on the left and a comparison table on the canvas, with numbered callouts
The WP Table Builder builder with the table area, elements and settings panels.

Step 2: Shift-Click the Cells You Want to Merge

Click the first cell, then hold the Shift key and click the other cells you want to join. The selected cells are highlighted. Pick neighbouring cells that form a clean rectangle, for example two cells side by side or two cells on top of each other. The Merge cells button only becomes active when the selection can be merged.

A rectangle of cells selected with Shift-click in WP Table Builder, with numbered callouts
A block of cells selected with Shift-click, ready to merge.

Step 3: Click Merge Cells

Click the Merge cells button in the toolbar above the table. The selected cells become one cell. WP Table Builder keeps the content of every cell you merged, so nothing is lost. Delete the elements you do not need and keep the one you want to show.

The merged cell in WP Table Builder containing the elements from all merged cells, with numbered callouts
The merged cell keeps the content from every cell that was joined.

Step 4: Style the Merged Cell

Now make the merged cell stand out. Select the Text element inside it to change the alignment (centered text often looks best in a wide merged cell), the font size and the font color. Under the Cell settings you can set the vertical alignment so the content sits in the middle of a tall merged cell.

To give merged cells their own background color, like the light purple cells in the example below, use the Cell Background option. This is a Pro feature. With the free plugin you can still color the header, odd and even rows from the table Background settings. See our guide on changing table colors in WordPress for every color option.

A selected cell in WP Table Builder with the table toolbar active above the table, with numbered callouts
Cell settings with vertical alignment, content distribution and cell background.

Step 5: Split a Cell If You Change Your Mind

Made a mistake? Click the merged cell and then click Split cell in the toolbar. The cell goes back to separate cells. The Split cell button is only active for cells that can be split, so it stays grey when you select a normal cell.

Step 6: Check How the Table Looks on Phones

Open the Responsive tab to preview the table at tablet and mobile sizes. For tables with a merged header or a simple layout, the stacked mobile view with First Row As Header works well.

WP Table Builder Responsive tab with the Mobile breakpoint selected, showing Stack Direction, First Row As Header and a stacked table preview, with numbered callouts
The Responsive tab with the Mobile breakpoint settings and a stacked table preview.

Tables with full width merged rows, such as breaks in a schedule or category rows in a menu, do not stack neatly into cards today. For those tables, turn off the responsive stacking and enable horizontal scrolling in the table settings instead. Readers can then swipe the table sideways on a phone while the merged cells keep their shape. Our guide on creating responsive tables in WordPress explains both approaches in more detail.

WP Table Builder Scroll section with Enable horizontal scrolling turned on, with numbered callouts
The horizontal scrolling setting keeps wide tables with merged rows readable on phones.

Step 7: Save and Add the Table to Your Post

Click Save. To show the table, add the WP Table Builder block in the block editor and pick your table, or click Embed in the builder and copy the shortcode, such as [wptb id="123" not found ], into any post, page or widget.

WP Table Builder Embed this table dialog showing the wptb id shortcode, the Copy button, and Gutenberg, Elementor and Divi options, with numbered callouts
The Embed dialog with the table shortcode and a Copy button.

Live Example: A Conference Schedule With Merged Cells

Here is a real WP Table Builder table that uses both kinds of merged cells. The welcome talk, lunch break and closing notes are merged across both room columns, and the two hour workshop in Room B is merged down two time slots. The merged cells use a light purple background so they are easy to spot.

Time

Main Hall

Room B

09:00

Welcome and opening talkBoth rooms

10:00

Build your first table

Pricing table workshop
Hands-on, bring a laptop
2 hours

11:00

Tables that work on phones

12:30

Lunch break60 min

13:30

Import data from a CSV file

Q&A with the team

15:00

Closing notes and prizesBoth rooms

Powered by WP Table Builder

On a phone, this table scrolls sideways so the merged rows stay intact. You can rebuild it in a few minutes: create a three column table, merge the cells as shown, and add your own sessions.

Tips for Merging Cells the Right Way

  • Plan the grid first. Decide how many columns and rows you need before you merge. Adding columns after merging can shift cells in ways you did not expect.
  • Merge only when it adds meaning. A merged cell should group related data or show that one value applies to several rows or columns.
  • Keep merged text short. Wide cells invite long sentences, but short labels such as “Lunch break” are easier to scan.
  • Make merged cells look different. Bold text, centered alignment or a soft background tells readers the cell covers more than one slot.
  • Avoid merging inside data you want to sort. Sorting works best on simple rows and columns, so keep sortable tables free of merged cells.
  • Always test on mobile. Check the Responsive tab and switch to horizontal scrolling when merged rows do not stack well.

Frequently Asked Questions

Can you merge cells in the default WordPress Table block?

Not with a button. The core Table block can store merged cells, but it has no merge option in its toolbar. You need to write the colspan and rowspan attributes in HTML, for example in a Custom HTML block, or use a table plugin such as WP Table Builder that merges cells visually.

Is merging cells free in WP Table Builder?

What is the difference between colspan and rowspan?

What happens to the content when I merge cells?

Do merged cells work on mobile?

Conclusion

Merging cells turns a plain grid into a table that shows how your data fits together. With the core Table block you can do it by writing colspan and rowspan in HTML. With WP Table Builder you simply Shift-click the cells, click Merge cells, style the result and check it on mobile, all without code.

Try it with your next schedule, menu or comparison table, and use the live example above as a starting point.

Comments

Leave a Reply