Set the collapsing borders model for a table:
The border-collapse property sets whether the table borders are collapsed into a single border or detached as in standard HTML.
| Default value: | separate |
|---|---|
| Inherited: | yes |
| Animatable: | no. Read about animatable |
| Version: | CSS2 |
| JavaScript syntax: | object.style.borderCollapse="collapse" Try it |
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| border-collapse | 1.0 | 5.0 | 1.0 | 1.2 | 4.0 |
Note: If a !DOCTYPE is not specified, the border-collapse property can produce unexpected results.
| Value | Description | Play it |
|---|---|---|
| separate | Borders are detached (border-spacing and empty-cells properties will not be ignored). This is default | Play it » |
| collapse | Borders are collapsed into a single border when possible (border-spacing and empty-cells properties will be ignored) | Play it » |
| initial | Sets this property to its default value. Read about initial | Play it » |
| inherit | Inherits this property from its parent element. Read about inherit |
CSS tutorial: CSS Table
HTML DOM reference: borderCollapse property