HTML table generator
Build the table in a grid and copy semantic, escaped <table> markup with a caption, <thead> and scoped headers, and no inline clutter.
Build the table in a grid and copy semantic, escaped <table> markup with a caption, <thead> and scoped headers, and no inline clutter.
<caption>: the table's title, read first by screen readers.<thead> / <tbody>: separate the header from the data, so browsers can repeat headers when printing.<th scope="col">: ties each data cell to its column header (WAI tables tutorial, W3C).style="text-align:…" only where you changed it.Turn existing data into a table with CSV to HTML table or JSON to HTML table. To scrape a table off a web page, use HTML table to CSV.
Put header cells in <th> with scope="col" (or scope="row" for row headers), group them in <thead>, and add a <caption> that says what the table shows. Screen readers use these to announce each cell with its header. The generator writes all three.
No. Use CSS grid or flexbox for layout. Tables are for tabular data: things with rows and columns that you would put in a spreadsheet. That is exactly what this generator is for.
Give it a class (for example data-table) in the options and target it in your CSS: .data-table { border-collapse: collapse } .data-table td, .data-table th { padding: .5rem; border-bottom: 1px solid #ddd }.
Yes. Cell text is HTML-escaped (<, >, & and quotes), so content like “a < b” cannot break the page or inject script.