CSS empty-cells
property specifies whether the empty cells of a table should be hidden or visible. It accepts two values, show
and hide
.
The empty-cells: show;
specifies that the empty cells of the table will be visible, while the empty-cells: hide;
specifies that the empty cells will be hidden.
See the tables below:
Example:
.table1{ empty-cells: show; } .table2{ empty-cells: hide; }
CSS Syntax
The empty-cells
property has the following syntax:
empty-cells: show|hide|initial|inherit;
Property Values
The empty-cells
property accepts the following values:
show | Sets borders around empty cells. This is the default value. |
hide | No border is shown around empty cells. |
initial | Sets the empty-cell property to its default value(show). |
inherit | Inherits the empty-cell property from the parent element. |
General Info
Default Value | show |
Inherited | Yes |
JavaScript Usage | element.style.emptyCells= “hide” |