CSS border-collapse Property


The border-collapse property sets whether table borders should collapse into a single border or be separated as in standard HTML.

Possible Values

  • collapse − Borders are collapsed to make a single border. Two adjacent cells will share a border.

  • separate − Borders are separated. Every cell has its own border, and none of these borders are shared with other cells in the table.

Applies to

Elements with a display of table or inline-table.

DOM Syntax

object.style.borderCollapse = "Any of the two values";

Example -