Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS border-collapse property


May 05, 2021 CSS Reference Manual


Table of contents


CSS border-collapse property

Description of property definition and use

The border-collapse property sets whether the border of the table is merged into a single border or displayed separately as in standard HTML.

Default: separate
Inherited: yes
Version: CSS2
JavaScript syntax: object object.style.borderCollapse="collapse"


Set up a merge border model for the table:

table { border-collapse: collapse ; }

Try it out . . .

Browser support

CSS border-collapse property CSS border-collapse property CSS border-collapse property CSS border-collapse property CSS border-collapse property

Border-collapse properties are supported by all major browsers.

Note: Any version of Internet Explorer (including IE9) supports the property value "inherit".

Note: Border - collapse property, if not specified! DOCTYPE, which can have unexpected effects.


Possible values

Value Description
collapse If possible, the borders are merged into a single border. The border-spacing and empty-cells properties are ignored
separate The default. T he border is separated. Border-spacing and empty-cells properties are not ignored
inherit Specifies that the value of the border-collapse property should be inherited from the parent element


Related articles

CSS tutorial: CSS Table