CSS Tables

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • table-layout: auto | fixed;
  • border-collapse: separate | collapse;
  • border-spacing: <length> | <length> <length>;
  • empty-cells: show | hide;
  • caption-side: top | bottom;

Remarks

These properties apply to both <table> elements (*) and HTML elements displayed as display: table or display: inline-table

(*) <table> elements are obviously natively styled by UA/browsers as display: table

HTML tables are semantically valid for tabular data. It is not recommended to use tables for layout. Instead, use CSS.



Got any CSS Question?