Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style emptyCells Property

Style emptyCells Property

Style Object Reference The Style object


Definition and Usage

The emptyCells property sets or returns whether to show the borders and background of empty cells in a table.

Syntax

Set the emptyCells property:

Object.style.emptyCells="show|hide|inherit"

Return the emptyCells property:

Object.style.emptyCells

Value Description
show Shows the borders and background of empty cells, that is, draws a border around empty cells.
hide Hides the borders and background of empty cells, that is, does not draw a border around empty cells.
inherit The value of the emptyCells property is inherited from the parent element.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the emptyCells property.

**Note:** The default value differs across browsers. In IE, Chrome, and Safari, the default value is "show", while in Firefox and Opera, the default value is "hide".

**Note:** IE7 and earlier versions do not support the emptyCells property. IE8 only supports the emptyCells property when a !DOCTYPE is specified. IE9 supports the emptyCells property.


Example

Example

Change how empty cells are displayed:

Runoob Tutorial(runoob.com)

    

        

        

    

    

        

        

    

    

        

        

    

Month Savings
January $100
February

Note: Internet Explorer 8 and earlier versions must declare a !DOCTYPE to support the empty-cells property.

Try it »


Style Object Reference The Style object