Basic Tables

Example

First NameLast NameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com

Here is a sample of a table with it’s colours reversed by adding a class to it called table-dark.

First NameLast NameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com

Description

You can add formatting to your tables by simply adding classes to the Advanced section of the table block.

Usage

Add a table to your site using gutenberg blocks.

Click on the table until you see the Block sidebar.

Add a table using WordPress editor.

At the bottom of the block options there is an “Advanced” area. In the “Additional CSS Class(es)”, you can add the classes

  • table to format the table with basic widths and header rows
  • table-striped will give your rows alternating background fills
  • table-dark will give your table a dark background with light text

Have some fun and try it out on your site.