How to Create a WordPress Table

Using tables allows you to present data in a way that is easier to understand, especially when you are including data in articles on a WordPress website. In this article, we will discuss how to create a WordPress table so you can present data that is easier for your website visitors to understand.

There are 3 options you can use to present data using tables in WordPress, which are using the WordPress block editor (Gutenberg), using a plugin, or using HTML code.

You can choose which method you want to use to display a table in WordPress based on the method you find easiest.

1. Creating a WordPress Table with the Block Editor

If you use the default WordPress block editor or Gutenberg and do not want to add a plugin to create a table, you can still create one easily. Here is how

  1. Edit or create a new article using the WordPress Block Editor
  2. Once you are on the WordPress block editor page, click the plus icon in the top-left corner to search for the table block
    Cara Membuat Tabel WordPress - 1-1
  3. Search for and select the “Table” block to add a table to the editor
    Cara Membuat Tabel WordPress - 1-2
  4. Choose the number of columns (Column Count) and the number of rows (Row Count) that you want to add, for example, we will create a table with 2 columns and 5 rows (not including the header row), then click the Create Table
    Cara Membuat Tabel WordPress - 1-3
  5. button. Enter the content you want to add to the table
    Cara Membuat Tabel WordPress - 1-4
  6. At this point, we have created a table, but there is still no header for each column. You can enable the Header Section option in the panel on the left side of the screen to add a table header.
    Cara Membuat Tabel WordPress - 1-6
  7. If you want to change the appearance to a zebra model (one row white, the row below it black, and the one below that white), you can open the Stylesoption, then select the stripes
    Cara Membuat Tabel WordPress - 1-7
  8. style. Now you can publish the table you have created, or perform more customizations.

2. Creating a WordPress Table Using a Plugin

There are many WordPress plugins that allow you to create tables easily, for example TablePress, wpDataTables, Ninja Tables, WP Table Builder, and others.

Here we will use TablePress because it is the most frequently used plugin, it is easy to use, and it does not slow down the website too much.

After the TablePress plugin is active in WordPress, you can follow these steps

  1. From the WordPress dashboard, open the TablePress menu → Add New Table (or if you already have a table saved in XLSX, CSV, ODS, HTML, or JSON format, you can use the Import Table option)
    Cara Membuat Tabel WordPress - 2-1
  2. Provide a table name, description, number of columns, and number of rows you want to create, then click the Add Tablebutton. This configuration can still be changed later, so do not worry if the number of columns or rows you created is not quite right
    Cara Membuat Tabel WordPress - 2-2
  3. Input the data you want to add to the table. Unlike the table in the WordPress editor, by default, the first row of this table will be the header row. So if you want to create 5 rows of data and 1 header row, you need to create 6 table rows.
    Cara Membuat Tabel WordPress - 2-3
  4. To check the appearance of the table you created, you can use the Preview button to display a table preview
    Cara Membuat Tabel WordPress - 2-4
  5. If everything looks good, you can save the table, then copy the shortcode that can be used to display the table in an article
    Cara Membuat Tabel WordPress - 2-5
  6. Now you can add or edit a new article where the table will be added, then just paste the shortcode you previously copied and the table will be added automatically
    Cara Membuat Tabel WordPress - 2-6

3. Creating a Table with HTML Code

If you use the Classic Editor and do not want to use an additional plugin to display a table, you can use HTML code, because currently there is no option to add a table in the classic editor

  1. If you want to use HTML code, you can create the HTML code manually using a text editor, or you can also use online tools, for example divtable.com
    Cara Membuat Tabel WordPress - 3-1
  2. Choose the number of columns and rows you want to create on divtable.com, and options will appear for you to enter your table data
    Cara Membuat Tabel WordPress - 3-2
  3. After filling in the table, you can copy the HTML code located in the panel on the right side of your table view
    Cara Membuat Tabel WordPress - 3-4
  4. Now you can add or edit a WordPress article that uses the classic editor, then in the display options change from Visual to Text and paste the HTML code you copied
    Cara Membuat Tabel WordPress - 3-5
  5. Change the view back to Visual, and the table will be displayed automatically so you can publish your article or make other changes
    Cara Membuat Tabel WordPress - 3-6

Those are 3 easy methods for creating a WordPress table. You can use whichever method you find most comfortable, as all three methods can be used to present data that is easier to read using tables.

Written by

Muhammad Khoirun Nasikin

I enjoy tinkering with WordPress, hosting, VPS, web development, and various small experiments related to websites. I have over 3 years of experience in the web hosting industry.

COMMENTS

Loading...