CSS border-collapseProperty
Example
Set the collapsed border model for tables:
table
{
border-collapse:collapse;
}
Try it Yourself »
Property definition and usage instructions
The border-collapse property sets whether table borders are collapsed into a single border or displayed separately as in standard HTML.
| Default Value: | separate |
|---|---|
| Inherited: | yes |
| version: | CSS2 |
| JavaScript Syntax: | object object.style.borderCollapse="collapse" |
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the border-collapse property.
Note:Any version of Internet Explorer (including IE9) supports the property value "inherit".
Note:The border-collapse property, if no !DOCTYPE is specified, may produce unexpected effects.
Property value
| Value | Description |
|---|---|
| collapse | If possible, borders are collapsed into a single border. The border-spacing and empty-cells properties are ignored. |
| separate | Default value. Borders are separated. The border-spacing and empty-cells properties will not be ignored. |
| inherit | Specifies that the value of the border-collapse property should be inherited from the parent element. |
Related Articles
CSS Tutorial:CSS Table
other extensions