A&S Web Guide

A helpful guide to web content and accessibility for the Faculty of Arts & Science, University of Toronto community.

  • U of T
  • Arts & Science Home
  • Drupal Guide
  • Web Writing
  • U of T Style Guide
  • Contact Us
You are here: Home / Drupal Guide / Tables

Tables

  • How to Create a Table
  • Adding Content to a Table
  • Editing a Table
  • How to Make a Table Sortable
  • How to Make a Table Striped
  • How to Make a Table Striped and Sortable
  • How to Add a Thick Border Around a Table
  • How to Make a Compact Table

How to Create a Table

  1. Click on the Table icon in the page’s editing panel.

Table icon.

  1. Fill in the Table Properties:

Table properties.

  1. Rows and Columns: Enter the number of rows and columns you’d like in your table. You can always add or delete rows and columns later.
  2. Width: Set the width to 100% – this ensures your table takes up the full width of the page. If you’re looking for a narrower table, set the width to 50%. Note: It’s important that any width you set is a percentage.
  3. Height: Leave this blank.
  4. Headers: For accessibility reasons, you need to indicate which portion of the table is the header: the first row, first column or both. Click on the drop-down menu under Headers to select the appropriate option.
  5. Border size, cell spacing and cell padding: By default, these will be set to 1. Delete this number so that the cell spacing and cell padding are both blank.
  6. Alignment: No need to change this. It will be set to “<not set>” automatically.
  7. Caption and summary: You can leave these blank.

Adding Content to a Table

If you are migrating an existing table (e.g., from a Word document, your existing website, etc.), copy and paste the relevant content into each individual cell:

  • Click on the cell to paste the content. Then, press Ctrl-V (or Cmd-V if you are a Mac user) on your keyboard.
  • You can also right-click on the cell in which you would like to paste the content and select Paste.

Select Paste.

If you choose this option, you may see the following prompt, depending on your browser. Follow the instructions, then click on OK.

Table paste popup window.

If you are creating a new table (i.e., you are not trying to migrate an existing table), type in the content as needed.

You can also add links, images and so on.

To change the width of any columns within the table, click a cell in the appropriate column (note: clicking a cell in your header row won’t work; you have to select a cell in the second row or lower). Then select the Styles drop-down menu:

Scroll down in this drop-down menu to view a list of column-width percentages, and select the percentage of your choice:

You can set a width for as few or as many of your table’s columns as you wish.

Editing a Table

  1. To add or delete a column or row, or to insert, delete, merge or split a cell, right-click anywhere in the relevant row, column or cell.

Right click options.

  1. Select Cell, Row or Column, depending on the change you would like to make.
  2. Select the option that reflects the change you would like to make.

Table icon.

How to Make a Table Sortable

You can make a table sortable by its column headings:

To make a table sortable, click anywhere in the table, then select the Styles drop-down menu:

Select tablesorter:

How to Make a Table Striped

Looking to make your table easier to read? Style your table so that it has alternating blue and white rows:

This is especially helpful for long tables.

To make your table striped, click anywhere in the table, then select the Styles drop-down menu:

Select table-striped:

How to Make a Table Striped & Sortable

You can style your table so it has alternating blue-and-white rows and can be sorted by its column headings:

To make your table striped and sortable, click anywhere in the table, then select the Styles drop-down menu:

Select tbl+strip+sort+border:

How to Add a Thick Border Around a Table

You can style your table so it has a thick black border around its perimeter:

To add a thick border to your table, click anywhere in the table, then select the Styles drop-down menu:

Select Thick Border Table:

How to Make a Compact Table

You can shrink your table to fit the size of the text in it:

To make a compact table, click anywhere in the table, then select the Styles drop-down menu:

Select Compact Table:

 

© 2025 Faculty of Arts & Science, University of Toronto