Sub topic 10
Designing a readable table
This chapter assumes you already know when a table is the right choice, as covered in the previous chapter. It also assumes you can write basic Markdown. Here you will learn how to build the table itself: the header row, the columns, the alignment, and the cell contents. A table is easy to skim only when each of these parts is built with the reader's scan in mind.
How readers use a table
A reader rarely reads a table from the top-left cell to the bottom-right cell. They do one of two things:
- Look up a value. They find a row by its label, then move across to the column they need.
- Compare values. They run their eye down one column to see which entry is highest, lowest, or different.
Both actions depend on the same two things. The reader must be able to tell what each row and each column means, and the values in a column must be easy to line up. Every design choice below serves one of those two needs.
Start with the header row
The header row names each column. It is the most important row in the table, because every cell below it is read in light of its header.
Good headers follow these rules:
- Name the content, not the position. "Storage" tells the reader more than "Column 2".
- Include the unit once, in the header. Write "Price per month (USD)" and then show plain numbers in the cells. This avoids repeating "GB" or "$" in every row.
- Keep headers short. A header that wraps onto three lines makes the table wider and harder to scan. Move detail into a note below the table.
- Make each header unique. Two columns called "Value" force the reader to count positions.
A table also usually needs a header for its first column. That column holds the row labels, and the reader needs to know what kind of thing the labels are. A blank top-left cell is a common mistake. Give it a name such as "Plan" or "Region".
Weak and strong headers compared
| Weak header | Problem | Stronger header |
|---|---|---|
| Info | Says nothing about the content | Release notes |
| Number | Does not say what is counted | Open tickets |
| Time | Does not give the unit | Response time (hours) |
| Value | Repeated in several columns | Monthly cost (USD) |
Choose the columns carefully
Each column should hold one kind of information, and every cell in it should be the same kind of thing. If one column mixes prices, dates, and free text, the reader cannot scan it.
Use these checks when you plan the columns:
- Put the row label first. The reader's eye starts at the left, so the thing being described belongs there.
- Order columns by importance or by a natural sequence. Put the attribute readers care about most next to the label. Use time order for columns such as "Q1", "Q2", "Q3".
- Limit the column count. Past five or six columns, readers lose track of which row they are in. On narrow screens the table may also scroll sideways.
- Remove columns nobody uses. If a column is the same in every row, state it once in the text above the table instead.
- Keep comparable columns next to each other. If readers will compare "Old price" and "New price", place them side by side.
If a table grows too wide, split it into two tables that each answer one question, or turn it so that the attributes become rows and the items become columns. The second option works when you have few items but many attributes.
Align cells to match their content
Alignment is the cheapest way to make a column scannable. The rule has two parts:
- Text is left-aligned. The eye then finds a clean left edge to start each line.
- Numbers are right-aligned. Digits then line up by place value, so the reader can see at a glance that 1,200 is larger than 120.
Center alignment is rarely the best choice. It leaves ragged edges on both sides and defeats the purpose of alignment. The one reasonable use is a column of short, equal-width codes or symbols.
In Markdown, the separator row controls alignment with colons:
| Separator | Alignment |
|---|---|
| `:---` | Left |
| `---:` | Right |
| `:---:` | Center |
| `---` | Renderer default, usually left |
Here is a table with the alignment set deliberately. The plan names and prices are made-up sample data.
| Plan | Storage | Users | Price per month |
|:------|--------:|------:|----------------:|
| Basic | 10 GB | 1 | $5 |
| Team | 100 GB | 10 | $20 |
| Scale | 1 TB | 100 | $90 |The "Plan" column is text, so it is left-aligned. The other three are numbers, so they are right-aligned. The header of each column uses the same alignment as its cells. That keeps the header sitting directly over the values.
Keep decimals consistent
Right alignment only works if numbers have the same number of decimal places. Compare these two columns:
| Item | Inconsistent | Consistent |
|---|---|---|
| A | 4.5 | 4.50 |
| B | 12 | 12.00 |
| C | 0.375 | 0.38 |
In the middle column the decimal points do not line up, so the reader cannot compare sizes by eye. In the right column they do. Choose a precision that fits the data and use it throughout the column.
Write cells that stand alone
Each cell should be short and make sense on its own. A reader who jumps straight to one cell should still understand it, given its row label and column header.
- Keep cells to a few words. If a cell needs a full sentence, the content may not belong in a table.
- Do not leave cells blank. A blank cell leaves the reader unsure whether the value is zero, unknown, or not applicable. Write "None", "Unknown", or "N/A", and use each one consistently with one meaning.
- Avoid repeating the header in the cell. If the column is "Supported", write "Yes" or "No", not "Supported" or "Not supported".
- Use the same form in every cell of a column. If one cell says "Yes", do not write "Y" in the next or "Available" in a third.
- Do not merge cells. Many tools, including Markdown, cannot represent merged cells, and screen readers handle them poorly. Repeat the value or restructure the table.
Before and after
A weak table mixes forms and leaves gaps:
| Tool | Works offline | Notes |
|---|---|---|
| Editor A | yes | |
| Editor B | Available | Needs a plug-in installed first, and the plug-in is only free for personal use |
| Editor C | N | |A stronger version uses one form per column and moves long text out of the cell:
| Tool | Works offline | Needs plug-in |
|:---------|:--------------|:--------------|
| Editor A | Yes | No |
| Editor B | Yes | Yes (1) |
| Editor C | No | No |
(1) The plug-in is free for personal use only.The second table can be scanned down either column. A short note below the table carries the detail that would have overloaded a cell.
Use a caption or lead-in
Tell the reader what the table shows before they reach it. One sentence above the table is enough, such as "The table compares the three plans by storage, user limit, and price." This lets readers decide whether to read the table, and it gives screen reader users context. If you refer to the table elsewhere, name it in the text rather than saying "the table below", because the layout may change.
Common errors
| Error | Effect on the reader | Fix |
|---|---|---|
| Header row missing or vague | Cells cannot be interpreted | Name every column, including the first |
| Numbers left-aligned | Values cannot be compared by size | Right-align numeric columns |
| Units repeated in every cell | Visual noise | Put the unit in the header |
| Mixed forms in a column | Column cannot be scanned | Use one form per column |
| Blank cells | Meaning is unclear | Write "None", "Unknown", or "N/A" |
| Too many columns | Reader loses the row | Split the table or remove columns |
| Long sentences in cells | Table becomes a wall of text | Use a list or move text to a note |
Check your table
Before you publish, test the table with two quick questions. Can a reader find a single value in under ten seconds? Can they tell which row is the largest or smallest in a column without calculating? If either answer is no, check the headers, the alignment, and the cell forms in that order.
Exercise
A colleague's table has the columns "Name", "Size", and "Cost". The Size cells read "10 GB", "100 GB", and "1 TB". The Cost cells read "$5.5", "$20", and "$90.25". Some cells in a fourth column, "Notes", are blank. List the changes you would make to improve scannability, and state the alignment for each column.
Show answer
Change the headers to carry units: "Size" stays as text with units in cells because the units differ (GB and TB), or convert all sizes to one unit such as GB and put "(GB)" in the header. Rename "Cost" to "Cost per month (USD)" and remove the dollar signs from the cells. Use the same decimal places for every cost: 5.50, 20.00, 90.25. Replace the blank Notes cells with "None", or remove the column if it is mostly empty. Alignment: Name is left-aligned because it is text. Size is right-aligned once it is all in one unit. Cost is right-aligned so the decimal points line up. Notes is left-aligned because it is text.
Exercise
Why should you avoid merged cells and centered number columns in a table meant to be skimmed?
Show answer
Merged cells break the one-header-per-column structure that readers and screen readers rely on, and Markdown cannot express them. Centered numbers leave ragged edges, so digits do not line up by place value and the reader cannot compare sizes at a glance.