Skip to main content

Tables should only be used to present tabular data (rows and columns of related information). They should not be used for layout or visual formatting, as this creates accessibility barriers and can cause issues on mobile devices.

Consider presenting information without a table. If the same information can be presented using headings and lists, this is preferable.

Covered In This Tutorial


Best Practices

  • Use tables only for data: Do not use tables for page layout.
  • Keep tables simple
    • Avoid merged cells (spanned cells).
    • Avoid blank cells. Use text such as “N/A” or “none” to indicate that there is no data.
    • Don’t use nested tables.
    • Consider splitting complex tables into multiple simple ones.
  • Ensure the table is accessible.
    • Add a table caption (or heading) to describe the table.
    • Use column and/or row headings so screen readers can announce them properly.
  • Ensure tables are responsive and mobile-friendly
    • Avoid wide tables that force visitors to scroll left and right.
    • Try to limit the number of columns or consider breaking the data into multiple smaller tables.

Visual vs. Screen Reader Experience

Sighted users can scan tables and visually connect data with the correct row and column headers. People using screen readers cannot make these visual associations so extra HTML markup is needed.

With proper markup (headers, and scope), screen readers announce the associated headers as they move through the table cell by cell. For instance, in the table below, sighted visitors can easily see where Biology 205 is held. Adding the proper markup ensures screen reader users get the same clarity.

Department Class # Section Room # Days Time Instructor
BIO 100 1 5 Mon, Wed, Fri 10 AM – 11 AM Brown
102 1 5 Tue, Thur 11 AM – 12 PM Smith
205 2 6 Tue, Thur 9 AM – 10 AM Brown
315 3 6 Mon, Wed, Fri 1 PM – 2 PM Smith
BUS 150 1 13 Mon, Wed, Fri 9 AM – 10 AM Roberts
210 2 8 Mon, Wed, Fri 8 AM – 9 AM Garcia

Without Proper Markup (What a screen reader user hears)

“Table with 10 columns and 7 rows. Department, Class Number, Section, Room Number, Days, Time, Instructor, BIO, 100, 1, 5, Mon, Wed, Fri, 10 AM – 11AM, Brown, 102, 1, 5, Tue, Thur, 11 AM – 12 AM, Smith, 205, 2, 6, Tue, Thur, 9 AM – 10 AM, Brown, 315, 3, 6, Mon, Wed, Fri, 1 PM – 2 PM, Smith, BUS, 150, 1, 13, Mon, Wed, Fri, 9AM – 10 AM, Roberts, 210, 2, 8, Mon, Wed, Fri, 8 AM – 9 AM, Garcia.

After listening to that, would you know where Biology 205 meets? Probably not – the relationships between headers and data aren’t conveyed.

With Proper Markup (Clear, associated announcements)

“Table, 7 rows, 10 columns… Row 4: Department Biology; Class Number 205; Section 2; Room Number 6; Days Tue, Thu; Time 9:00 AM–10:00 AM; Instructor Brown.”

Now the location for Biology 205 is obvious: Room 6.

This is a modified example from Creating Accessible Tables on WebAIM.


How To Create a Table

  1. Place your cursor where you want the table to appear.
  2. Click either the Table menu or the the Table icon in the editor toolbar.
    Screenshot of the WordPress editor highlighting the table options.
  3. Select the Table option.
  4. Drag your cursor along the table preview, to select the desired number of rows and columns. This will insert an empty table into your page.
  5. Enter your data into the cells.
  6. Add a table caption (see detailed instructions below).
  7. Label all column and/or row headings along with the corresponding scope attribute (see detailed instructions below).
  8. Use the table menu or icon options to add or delete rows and columns as needed.
  9. Optional – add a table class to style the table.

Make the Table Accessible

Though not required, tables should include a short description so all users understand what the data represents. This can be done with either a table caption, an HTML heading, or both.

Table Captions (<caption>)

  • A <caption> is part of the table itself and is programmatically tied to that table.
  • Screen readers announce captions when the table is reached, giving users helpful context before hearing the data.
  • Captions are especially useful when there are multiple tables on a page.
  • Keep captions short — one brief line or phrase.

How To Add a Caption

  • Place your cursor somewhere inside the table.
  • Select the Table icon or the Table menu in the editor, then choose Table Properties.
    Screenshot of the WordPress editor highlighting the table options.
  • Add a check next to the Caption option.
  • Click Ok.
  • A blank field (the caption) will display across the top of the table.
  • Click inside the caption area and write a brief description of what the table contains.

Headings Before Tables (H2, H3, etc.)

  • Headings are part of the page structure and help users navigate content.
  • A heading placed directly before a table gives context but is not programmatically associated with the table.

Using a Heading AND a Table Caption

  • Using both gives clarity and accessibility for all users.
  • Avoid duplication — don’t repeat the exact same text in both the heading and the caption.
  • Neither is required, but both are helpful when used correctly.

Styling the Caption

A heading can be applied to the caption to change the font styles.

  1. Select the entire caption.
  2. In the toolbar, locate the formatting drop-down menu that typically displays “Paragraph” by default.
  3. Click the menu and select the appropriate heading level.

Row and Column Headers

Properly marked header cells help screen readers communicate how table data relates across rows and columns, ensuring users who rely on assistive technology can interpret the information as clearly as sighted visitors. Adding a scope attribute to each header cell further defines whether it applies to a row or a column, strengthening these associations.

In html, the <td> element defines a table data cell. By default, all cells will initially be <td> cells. Any cells used as headers need to be converted to <th> cells which defines a table header.

Each <th> also needs a scope attribute to identify wether it’s a column or row header. This ensures assistive technologies can correctly associate headers with the right data cells.

How To

  1. You should have already created a table and added data to the table as well as a table caption.
  2. Define column headers:
    1. Drag across all of the column header cells to select them.
    2. In the Editor, select Table  Cell  Table cell properties. This will bring up a pop-up window.
    3. Set the Cell Type to a Header Cell.
    4. Set the Scope to Column.
    5. Select OK.
      Screenshot of the table cell properties highlighting the cell type and scope settings for columns.
  3. Define row headers:
    1. Drag down over all of the row header cells to select them.
    2. In the menu of the Visual Editor, select Table  Cell  Table cell properties. This will bring up a pop-up window.
    3. Set the Cell Type to a Header Cell.
    4. Set the Scope to Row.
    5. Select OK.
      Screenshot of the table cell properties highlighting the cell type and scope settings for rows.

 

Example Table

This is the Caption
Column Heading 1 Column Heading 2 Column Heading 3
Row Heading 1 Data Data
Row Heading 2 Data Data
Row Heading 3 Data Data

 


Examples

Color Names in Multiple Languages
Color French German Italian Portuguese Spanish
Red rouge rot rosso vermelho rojo
Orange orange orange arancione laranja anaranjado
Yellow jaune gelb giallo amarelo amarillo
Green vert grün verde verde verde
Blue bleu blau blu azul azul
Purple pourpre lila porpora roxo morado

April Cafeteria Menu (Header)

Menu For April 10th through 14th (Caption)
Day Lunch Dinner
Monday Soup and Salad Meatloaf
Tuesday Tacos Steak
Wednesday Sandwiches Chicken
Thursday Curry Roast Beef
Friday Burgers Pizza
Menu For April 17th through 21st (Caption)
Day Lunch Dinner
Monday Pizza Curry
Tuesday Roast Beef Sandwiches
Wednesday Steak Burgers
Thursday Meatloaf Tacos
Friday Chicken Soup and Salad
  • Is a complex table.
  • There is no table caption or preceding heading to describe what the table represents.
  • Column and row headers are not identified — they’ve only been visually styled as bold text.
  • Contains empty cells
  • Uses merged cells
  • Complex structure makes it hard for screen readers to interpret relationships

 

Assignment Point Value Due Date
TESTS
Test 1 200 points February 2
Test 2 200 points February 28
Final 25% of grade April 10
PROJECTS
Project 1 100 points January 25
Project 2 150 points February 22
Group Project 50 points Draft: March 20
100 points Final: April 5

Data for demonstration purposes only.

Below are two ways to make the example above accessible and more user-friendly:

  1. Option 1 – Split the complex table into two simpler tables (one for tests, one for projects).
  2. Option 2 – Rearrange the data into a single chronological table.

Both examples:

  • Have clear column and row headers (<th> elements)
  • Use the scope attribute to associate headers with data
  • Avoid empty or merged cells
  • Include a caption describing the purpose of the table

Option 1

Test Dates
Test Point Value Due Date
Test 1 200 points February 2
Test 2 200 points February 28
Final 25% of grade April 10
Project Due Dates
Assignment Point Value Due Date
Project 1 100 points January 25
Project 2 150 points February 22
Group Project (Draft) 50 points March 20
Group Project (Final) 100 points April 5

Options 2

Dates For Class Projects and Tests
Assignment Point Value Due Date
Project 1 100 points January 25
Test 1 100 points February 2
Project 2 150 points February 22
Test 2 100 points February 28
Group Project (Draft) 50 points March 20
Group Project (Final) 100 points April 5
Final 25% of grade April 10

Data for demonstration purposes only.


Removing Unwanted Table Formatting

When you create a table, the editor often adds unwanted formatting such as specified table or column widths. These styles can cause tables to look uneven or behave poorly on smaller screens.

How To Fix

  1. Place your cursor somewhere inside the table.
  2. In the editor, click on the Format menu and select Remove table styling.
    Screenshot showing the 'remove table styling' option in the WordPress classic editor.

Video Tutorials

Designing Accessible Tables

Learn how to make the data tables more accessible via editing the html.
4 min. 27 sec.

Screen Reader Demo

See how screen readers navigate through accessible and inaccessible tables.
3 min. 10 sec.


Test for Accessibility

Use SiteImprove or WAVE to check a table’s accessibility.


Resources