HTML Table Generator
Configure rows, columns, headers, and styling attributes, then copy the generated HTML table markup — placeholder content and all.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML Table Generator?
The HTML `<table>` element displays tabular data in rows and columns. A well-structured table uses `<thead>` for column headers, `<tbody>` for data rows, and optionally a `<caption>` describing the table. The `border`, `cellpadding`, and `cellspacing` attributes control basic visual layout, though CSS is generally preferred for production styling.
This generator creates a complete table scaffold with the correct element nesting and placeholder content, so you can paste it into your HTML and replace the text with real data.
How to Use HTML Table Generator
Set the number of rows and columns
Toggle the header row and caption options
Optionally set id, class, cellpadding, or cellspacing
Copy the generated HTML
Replace Header N and Row N, Col N with your actual data
Common Use Cases
- Developers hand-coding comparison tables or data grids in HTML.
- Email template authors who need a simple table scaffold.
- Students learning HTML who want to see correct table structure.
- Content editors pasting table HTML into CMS fields.
Example Input and Output
A 2-column, 3-row table with header row and border.
Rows: 3, Columns: 2, Header: yes, Border: yes<table border="1">
<thead>
<tr><th>Header 1</th><th>Header 2</th></tr>
</thead>
<tbody>...</tbody>
</table>Privacy
All HTML generation runs in your browser. No data is sent to any server.
Frequently Asked Questions
Should I use border attribute or CSS for table styling?
The border attribute is supported for backward compatibility but is considered presentational HTML. For production, use CSS (border-collapse, border, padding) in a stylesheet instead. The attribute is useful for quick prototyping or HTML emails.
Related Tools
HTML Link Generator
Generate HTML anchor tags with href, target, rel, title, download, and other attributes. Copy ready-to-use link code instantly.
HTML Button Generator
Generate HTML button elements with type, id, class, style, onclick, disabled, aria-label, and other attributes. Preview included.
HTML Progress Bar Generator
Generate HTML progress bar elements with value, max, label, id, class, and style attributes. Includes live preview.
CSV to HTML Table Converter
Convert CSV or TSV data into a clean HTML table with border, striped rows, and responsive wrapper options.
JSON to CSV Converter
Convert a JSON array of objects to CSV. Flattens nested objects with dot-notation columns and handles arrays within values.
XML to HTML Table Converter
Convert XML to an HTML table. Detects repeating child elements as rows, flattens nested nodes with dot notation, adds optional inline styles, and shows a live preview.

