Set rows and columns
Choose the grid size and whether the first row should be headers.
HTML Table Generator on CalculatorX—clear steps, local browser calculation, and no account required. Runs locally in your browser. Try it free.
Loading tool…
Choose the grid size and whether the first row should be headers.
Build <table> scaffolding with <th>/<td> placeholders.
Copy the markup, fill in real cell content, and add CSS classes for styling.
Version 1.0.0 · Engine tested
table = thead? + tbody with rows×cols cellsThe HTML Table Generator creates <table> markup with optional CSS styling. Define rows, columns, header cells, and border styles visually, then copy the generated HTML.
<table>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</tbody>
</table>
| Tag | Purpose |
|---|---|
<table> |
Table container |
<thead> |
Header section |
<tbody> |
Body rows |
<tr> |
Table row |
<th> |
Header cell (bold, centered) |
<td> |
Data cell |
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #0066cc;
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
</style>
See HTML color codes for color values.
<th scope="col"> or scope="row" for header cells<caption> to describe the table purposeheaders attribute on <td> cellsKey distinctions behind the tool.
Prefer a header row for data tables so screen readers and humans can identify columns.
Yes—add CSS classes or inline styles after you paste the markup into your page.