# Data Table

> Facts set out in rows and columns. A top row names each column.

**Field:** Design  
**Category:** User Interface  
**Also known as:** Table (UI), Data Grid, Sortable Table

## Think of it like

It is like a times table chart. Rows go across, columns go down, and each box has one fact.

## Definition

A data table shows facts in rows and columns. A header row names each column. It suits many items that share the same fields, like orders with a date, a price and a status. People can read down a column to compare, and often sort it by clicking a header. Numbers line up on the right so they are easy to compare.

## Example

A shop owner sees orders in a table. She clicks the Price header to sort from highest to lowest.

## Example code

```html
<table>
  <thead><tr><th>Order</th><th>Price</th></tr></thead>
  <tbody><tr><td>1042</td><td>$20</td></tr></tbody>
</table>
```

The th cells name each column, so screen readers can say which column a fact is in.

## Why it matters

It is the fastest way to compare many items field by field.

## Common mistake

Using a table on a phone with ten columns. It scrolls sideways; show fewer columns or switch to a list.

## Three principles

- **Rows and columns.** Each item, each field.
- **Read down to compare.** Sort by the header.
- **Numbers to the right.** Easy to line up.

## Related terms

- [List View](https://learn.benibix.com/term/design/list-view)
- [Pagination Control](https://learn.benibix.com/term/design/pagination-control)
- [Card](https://learn.benibix.com/term/design/card)

## Taught in

- [Data Tables, Lists and Cards](https://learn.benibix.com/learn/design-user-interface/data-tables-lists-and-cards): UI Components, 13/14

---

Source: https://learn.benibix.com/term/design/data-table
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
