How to Create an HTML Table with Accessible Headings

All tools: Developer Tools

Build an HTML table online with a caption, column headings, editable cells and spreadsheet paste. Preview and download responsive HTML/CSS.

Open the free tool →

Plan the information before generating markup

Use a table when readers need to compare the same attributes across several items: plans, specifications or measured results. Use paragraphs or a list when the information has no meaningful row-and-column relationship. Keep each column focused on one attribute and include units in its heading.

Decide whether the first row contains labels or actual data. The generator can place that row inside thead with th elements and scope="col". If you turn this option off, every row is exported as ordinary body cells.

Edit cells or paste spreadsheet data

Set the dimensions before editing: reducing the row or column count removes cells outside the new range. A table can have up to 20 rows including its header and 12 columns. Enter plain text directly or paste a rectangular selection from a spreadsheet.

The import uses tabs between columns and newlines between rows. It is not a CSV parser and does not support quoted multiline cells. Imports exceeding the size limits are rejected without replacing the current table. Check the preview after every import.

Integrate responsive and accessible markup

Add a descriptive caption so the table has a visible subject. Download or copy the generated snippet, including its CSS. The scroll container preserves the column structure on a narrow screen; it does not shrink all text to fit. Test with your existing page styles.

Cell text is escaped, so a value such as <10 is displayed as text instead of becoming HTML. Complex tables with merged cells or several header levels need additional markup and accessibility review. This generator deliberately produces a simple rectangular table with one optional header row.

How to use the tool

Set rows and columns, edit the cells or import tab-separated spreadsheet data. Add a caption, check headings, then copy or download the code.

Worked example

Create a three-column comparison table; make its first row the headings and add a descriptive caption.

Does the generated table work on mobile?

The export wraps the table in a horizontally scrollable container. This preserves readable columns on small screens. Test the table with your website’s styles.