You converted your CSV and pasted the snippet into your page. The table looks like something from 1998. It has no borders worth the name and cramped cells. Its header row looks like every other row. The instinct is to go back to the converter and hunt for the styling settings you must have missed.
There are none, and that is the honest starting point of this guide. The free CSV to HTML Table converter on Ovatly deliberately outputs a bare, unstyled snippet: clean structure, escaped content, nothing about looks. Styling an HTML table generated from CSV data is a CSS job that happens on your page, after the conversion. The good news: the CSS job is small, done once, and inherited by every table you generate afterwards.
Contents
- Quick answer
- What the converter gives you, and what it does not
- Where the styling actually lives
- How to style the table, step by step
- Worked example: a plain snippet, styled
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
The CSV to HTML Table converter adds no styling. It produces a snippet with a table element. It has th header cells when the header option is on, and td data cells. The cell content is escaped. To style it, paste the snippet into your page. Then add CSS rules that target those elements. Collapse the borders. Give cells padding and a light border. Shade the th row. Add zebra striping with nth-child. Wrap the table in a container with horizontal scrolling for narrow screens.
What the converter gives you, and what it does not
The converter's job is translation. It reads your CSV rows and writes the equivalent table markup. You get one table element and a row per line. Header cells appear for the first row if you asked for them. Every value is escaped. So a cell containing & or < displays as text instead of breaking the page. It shows a live preview, but the preview is sanitized and structure-only. It confirms the rows and columns landed correctly. It does not show how the table will look on your site.
What it does not give you is any presentational layer. There is no style attribute on the elements, no embedded stylesheet, no classes or ids, and no options panel with fonts and colors. That restraint is useful: a snippet that arrived wearing its own colors would fight the design of every page it landed on. A bare snippet takes on the look of its new home, once the home actually has table styles to give it.
Where the styling actually lives
Table styling lives in CSS. And CSS lives with your page. It sits in your theme's stylesheet, in a style block, or wherever your site keeps its rules. The snippet supplies the structure and the content; the stylesheet supplies borders, spacing, colors and alignment for the table, th and td elements.
Write the rules once and every table you paste in afterwards is styled the moment it lands. Regenerating is painless for the same reason: you replace the markup, and the untouched stylesheet styles the new markup exactly as it styled the old.
How to style the table, step by step
- Convert your CSV with the CSV to HTML Table converter and copy the snippet. Turn the header option on if your first row holds column names.
- Paste the snippet into your page. If the styles should apply to this table only, wrap it in a
divwith a class of your choosing, such ascsv-table. - Add CSS rules for the table elements. Set
border-collapse: collapseon the table. Then givethandtda border and padding, so the grid reads clearly. - Style the header row through the
thselector. A background shade and bold text separate it from the data. You never touch a single cell by hand. - Add zebra rows with
tr:nth-child(even)so long tables are easier to scan, and check numbers columns read better right-aligned if your data has them. - Make it safe on phones: give the wrapper
overflow-x: autoso a wide table scrolls sideways inside its container instead of breaking your layout. - Reload the page and read the table at phone width and desktop width. Adjust the CSS, never the snippet, until it reads well at both.
Worked example: a plain snippet, styled
Start with this small CSV of products:
Product,Price,Stock
Desk lamp,25,14
Notebook,4,120
Mug,8,57
Converted with the header option on, the snippet is:
<table>
<tr><th>Product</th><th>Price</th><th>Stock</th></tr>
<tr><td>Desk lamp</td><td>25</td><td>14</td></tr>
<tr><td>Notebook</td><td>4</td><td>120</td></tr>
<tr><td>Mug</td><td>8</td><td>57</td></tr>
</table>
Pasted in as-is, that renders as plain text in rows. Now add this CSS block to your page:
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #d0d0d0; padding: 8px 12px; text-align: left; }
th { background: #f2f2f2; }
tr:nth-child(even) td { background: #fafafa; }
Each rule earns its place. border-collapse merges the cell borders into single 1px lines instead of doubled ones. The padding, 8px vertical and 12px horizontal, gives every value room. The th rule shades the Product, Price, Stock header row light grey so the eye finds the column names first. The nth-child rule tints alternate data rows. In this table, that is Notebook's row. A reader tracking across the Stock column is then less likely to slip into the wrong row. Four short rules turn the same data into a table you can actually read.
Limitations and honest tradeoffs
The converter will never style the table for you. This guide cannot change that. If you want a one-click designed table, this is the wrong tool. The snippet also carries no classes or ids. So your CSS either targets the table elements generally, which styles every table on the page the same way. Or you add a wrapper class yourself when pasting, as the steps suggest.
Element-level CSS has limits too. It cannot easily give one specific column a different treatment without extra selectors. It cannot restyle a single unusual cell either. For that, you would edit the pasted snippet by hand. That is your right, since it is plain markup on your page. Finally, your page's existing theme may already style tables, sometimes strongly. If the result looks odd, the theme's rules and yours are combining. The fix is to scope your rules under a wrapper class. They then win for this table.
Common mistakes
- Hunting for styling settings in the converter. There are none. The plain look is the snippet waiting for your CSS, not a setting you missed.
- Adding style attributes cell by cell. Dozens of inline styles are unmaintainable. One rule for
tddoes the same job and updates everywhere at once. - Skipping
border-collapse. Without it, adjacent cell borders double up and the grid looks heavier and fuzzier than it should. - Forgetting the wrapper on wide tables. An unstyled wide table overflows a phone screen and breaks the layout. A wrapper with
overflow-x: autokeeps the page intact. - Styling the snippet instead of the stylesheet. If you hand-edit the generated markup to add colors, the next regeneration throws that work away. Styles belong in CSS, where they survive.
FAQs
Does the CSV to HTML Table converter have styling options? No. It outputs a bare snippet containing the table structure only: header cells, rows and data cells, with content escaped. There are no settings for colors, borders, fonts or spacing. That is deliberate. The table can then take on the look of the page it lands on.
Why does my converted table look plain on my page? Because the snippet carries no styling of its own. It inherits whatever your page already applies to tables. If your theme has no table styles, the browser shows its plain default look. That lasts until you add CSS rules for the table elements.
How do I style the header row differently from the data rows?
Target the header cells in your CSS. With the header option on, the first row is marked up with th elements instead of td elements. So a rule for th shades, bolds or aligns only the header row. It leaves the data rows alone.
Can I scope styles to just this one table?
Yes. The snippet arrives without classes or ids. So wrap it in a div with your own class when you paste it. Then write your CSS rules under that class. The styles then apply to this table and nowhere else on the page.
Will my styling be lost if I convert the CSV again? No. Your styles live in your page's stylesheet, separate from the snippet. Regenerating replaces only the table markup, and the same CSS applies to the new snippet because it targets the same elements.
Conclusion
A generated table is two halves from two places: the converter supplies clean, escaped structure, and your CSS supplies the look. Once you accept that split, styling stops being a hunt for a missing setting. It becomes five minutes of stylesheet work. That work pays off on every table after. Does the table you are styling hold results or scores rather than products? Our companion guide on converting event results or scores into a web table walks through that publishing job end to end. For more guides in this series, see our Data and JSON Tools guides.
References
- MDN Web Docs, on styling tables with CSS: https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Tables
- MDN Web Docs, on the
nth-childselector used for zebra rows: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:nth-child