CSS border- collapse property

This property set the border of the table cells ans specifies wheather the table cells share the seprate or common border.

This property has two main values that are seprate and collapse. When it is set to the value seprate, distance between the cells can be defined using the border-specing property. When the border-collapse is set to the value collapse, then the inset value of the border-style property behaves like groove, and the outset value behave like ridge.


border-collapse: separate| collapse| initial | inherit;

Property values:-

seprate:- It is the default value that seprates the border of the table cell. Using the value, each cell will display its own border.

collapse:- The value is used to collapse the borders into a single border. Using this, two adjacent table cells will share a border. When this value is applied, the border-spacing property does not affect.

initial:- It sets the property to its default value.

inherit: It inherits the propperty form its parent element.

Example- Using seprate value

Example:- Using collapse property:-

shashank K
Latest posts by shashank K (see all)
Tagged : / /
0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x