TL
Tool Lab
💰Donate
💰Donate

HTML Table Generator

Build HTML tables with a visual editor and copy the code instantly.

HTML Output
<table border="1" cellpadding="8" style="border-collapse: collapse; width: 100%;">
  <thead>
    <tr>
      <th style="padding: 8px; text-align: left;">Header 1</th>
      <th style="padding: 8px; text-align: left;">Header 2</th>
      <th style="padding: 8px; text-align: left;">Header 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="padding: 8px;">Cell 1,1</td>
      <td style="padding: 8px;">Cell 1,2</td>
      <td style="padding: 8px;">Cell 1,3</td>
    </tr>
    <tr>
      <td style="padding: 8px;">Cell 2,1</td>
      <td style="padding: 8px;">Cell 2,2</td>
      <td style="padding: 8px;">Cell 2,3</td>
    </tr>
    <tr>
      <td style="padding: 8px;">Cell 3,1</td>
      <td style="padding: 8px;">Cell 3,2</td>
      <td style="padding: 8px;">Cell 3,3</td>
    </tr>
  </tbody>
</table>

About This Tool

The HTML Table Generator lets you set row and column counts, edit cells directly, and get ready-to-use HTML table code. You can visually configure header rows, borders, striped rows, and cell padding.

The generated HTML follows semantic markup with proper thead and tbody structure, which is better for accessibility and screen readers. The code updates in real time as you edit.

How to Use

  1. Set the number of rows and columns.
  2. Toggle header row, border, and striped rows using checkboxes.
  3. Adjust the cell padding value.
  4. Click any cell to type your content directly.
  5. Copy the code under "HTML Output" and use it in your project.

Use Cases

Great for data comparison tables, pricing tables, schedules, product specification tables, and any information displayed in tabular format on a web page.

FAQ

  • Can I style the table without CSS?Yes. The generated HTML includes border attributes and cellpadding, so basic styling is applied without any CSS.
  • Can I add colspan or rowspan?This tool generates a basic table structure. Edit the generated code directly to add colspan/rowspan attributes.
  • How do I make the table responsive?Wrap the table in a div with overflow-x: auto, or use CSS media queries to allow horizontal scrolling on small screens.