CSS
CSS TablesCSS Tables
CSS formats the borders, alignment, and spacing of HTML tables.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
CSS transforms basic HTML tables into readable data grids. Developers use properties like borders, padding, and text alignment to space out the content. You can collapse the double borders into a single clean line.
Example
Example
Key Points
- The `border-collapse` property merges double table borders.
- Padding inside `
` and ` ` adds breathing room. - Text aligns left by default in data cells.
- The `nth-child` selector creates striped rows.