Tables are great … for data
Using a WYSIWYG editor, you can copy-and-paste a table or add one from scratch by using the Table tool. Remember, though, that tables are for tabular data, not for layout or effect.
Table Basics
Tables are for data and only data.
Before you add a table, ask yourself:
- Does this table have multiple columns and rows?
- Does this table have (or can you add) row and/or column headers? A header describes what's in a related row or column. For example: "Class," "Date," "Time," and "Location" might be headers for a table that lists available training opportunities.
If you answered no to either question, you don't have a table. Use other methods to get the effect you're looking for.
For example, if you want similar content to appear in different columns, consider using:
The WYSIWYG editor lets you easily edit and meet accessibility requirements for simple tables. A simple table has a header row, a header column, or both. Simple tables do not include irregular or multiple-level headers or merged cells.
The table tools will let you add complex tables, but setting them up correctly and making them accessible and user-friendly can be difficult. Unless you have an overwhelming desire to tweak the HTML to make your table work properly, we recommend breaking any complex table into a few simple tables or finding a different way of displaying your information. Contact us if you have a complex table and aren't sure how to deal with it. See “Cell Options” if you want to try adding a complex table.
Examples of Simple Tables
Date | Time | Location |
---|---|---|
May 12 | 8:30 a.m. | Rosenfield Center, Room 101 |
May 13 | 4:40 p.m. | Bucksbaum Arts Center, Roberts Theatre |
Date | May 12 | May 13 |
---|---|---|
Time | 8:30 a.m. | Noon |
Location | Rosenfield Center, Room 101 | Bucksbaum Arts Center, Roberts Theatre |
For accessibility, your table must:
- Be used for tabular data. Don't use tables as a way to layout columns or add white space.
- Indicate row and column headers.
- Be simple or, if the table is complex, include full header information, an excellent summary, and proper
<tr>
,<th>
, and<td>
tags and construction.
Your table should:
- Include a caption and/or a summary explaining what the table contains. This will help people with screen readers quickly figure out if a table has content they are interested in.
Our tables are:
- Responsive: they resize to fit the user's browser window. The browser determines the optimal width of each column.
- Standardized: captions, headers, and data look the same throughout the site.
The published table will look different from what you see in the editor.
- When you paste a formatted table from elsewhere, it may look like you kept formatting such as background colors or column widths, but these will be ignored in the published version.
- The table properties appear to allow you to set properties that will later be removed or overridden when the table is published.
A few things that are different when the table is published include:
- Table captions will appear above the table, styled to look like a part of the table.
- Table headers will automatically be styled to stand out from the rest of the table. Do not try to bold them or otherwise try to distinguish them. Just make sure they are marked as headers.
- Table properties such as cell spacing, padding, and border size will be overridden by the site styles. They will show up in the WYSIWYG editor, but be ignored on the published page.
- Cell properties, such as vertical and horizontal alignment and border and background color, will be stripped or overridden in the published table.
What does this mean for you?
It means you need to focus on making sure your tables are simple, are used for tabular data, and have headers that are marked correctly.
It means don't bother tweaking the width of a column, setting a background color, or adding a deep border to a table.