---
title: "Compare a few things clearly."
description: "Build a small table and recognise when a list or spreadsheet is a better fit."
canonical: https://editmd.app/learn/lessons/tables/
markdown: https://editmd.app/learn/lessons/tables.md
status: pre-release, waiting list open
generated: editmd-website
---

# Compare a few things clearly.

Lesson 14 of 18 in Markdown School. Build a small table and recognise when a list or spreadsheet is a better fit.

## Start with a small comparison

Tables suit short entries that share the same fields. Use a list for a single stream of points, or sections for long explanations. A spreadsheet is a better fit when you need formulas, sorting or a large dataset. This lesson assumes you can edit a [plain Markdown document](/learn/lessons/headings/).

## Give the header a separator

The example compares formats by purpose. The first row names the fields. The next row marks it as a table, and the remaining rows hold entries.

```markdown
| Format     | Best for    |
| ---------- | ----------- |
| Markdown   | Guides      |
| Plain text | Short notes |
```

Tables are an extension in GitHub Flavored Markdown, not part of core CommonMark. A GFM table needs a header and a matching delimiter row. Test the document in its intended destination. See the [GFM table specification](https://github.github.com/gfm/#tables-extension-).

## Alignment and literal pipes

A colon at the right end of a separator requests right alignment, useful for a small numeric column. Alignment changes presentation, not the value. Escape a literal pipe in a cell so it is not treated as a column boundary:

```markdown
| Item         | Count |
| ------------ | ----: |
| Small pots   |     3 |
| A \| B label |     1 |
```

These forms are described in GitHub’s [table-formatting guide](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables).

## See the mistake, then fix it

Without the separator, the starter reads as ordinary paragraph text. Insert the separator below the header and watch the cells appear. Then add Plain text as the second data row. The check requires two columns with the supplied header and two complete rows. It does not judge whether your comparison is true.

## Keep the information usable

Keep cells short, use meaningful column labels and avoid a wide table that needs constant sideways scrolling on a phone. Do not use tables merely to position page elements. If an AI assistant creates a comparison, verify the entries and sources; a tidy grid is not evidence that the claims are correct.

## Exercise

Add the missing separator row and a row for Plain text with Best for set to Short notes. Keep two columns in every row.

## Takeaway

A table compares repeated fields. It does not calculate them.

Related guide: https://editmd.app/docs/writing/. All lessons: https://editmd.app/learn.md
