HTML | DOM Style emptyCells Property Last Updated : 08 Aug, 2022 Comments Improve Suggest changes Like Article Like Report Sometimes HTML tables contain empty cells. The DOM Style emptyCells is used to display borders and background for the empty cells. Syntax: It is used to return the emptyCells property.object.style.emptyCellsIt is used to set emptyCells property.object.style.emptyCells = "show|hide|initial|inherit" Return Value:A string representing the border and background of empty cells. Property Values: show: It means that the borders and background on empty cells will be shown. It is the default value of this property.hide: It means that the borders and background on empty cells won't be shown.initial: It makes the property use its default value (i.e. show).inherit: It inherits the property from its parents element. Example-1: The following code shows how to set the emptyCells property between the show and hide. html <!DOCTYPE html> <html> <head> <title> DOM Style emptyCells Property </title> </head> <body> <center> <h1>GeeksforGeeks</h1> <h2>DOM Style emptyCells Property</h2> <table id="a1" border="1"> <tr> <th>Student Name</th> <th>Age</th> </tr> <tr> <td>Manas Chhabra</td> <td>19</td> </tr> <tr> <td>Hritik Bhatnagar</td> <td></td> </tr> </table> <br> <button type="button" onclick="hide()"> Hide empty cells </button> <button type="button" onclick="show()"> Show empty cells </button> <!-- script to show or hide emptyCell border --> <script> function hide() { document.getElementById("a1").style.emptyCells = "hide"; } function show() { document.getElementById("a1").style.emptyCells = "show"; } </script> </center> </body> </html> Output: Before click on Hide button: After clicking Hide button: Example-2: The following code shows how to get the emptyCells property. html <!DOCTYPE html> <html> <head> <title> DOM Style emptyCells Property </title> </head> <body> <center> <h1>GeeksforGeeks</h1> <h2>DOM Style emptyCells Property</h2> <table id="a1" border="1" style="empty-cells:hide;"> <tr> <td></td> <td>$</td> </tr> <tr> <td>@</td> <td></td> </tr> </table> <button type="button" onclick="myFunction()"> test </button> </center> <script> function myFunction() { console.log(document.getElementById("a1" ).style.emptyCells); } </script> </body> </html> Output: Before clicking Test button: After clicking Test button: Supported Browsers: The browser supported by DOM Style emptyCells Property are listed below: Google Chrome 1.0 and aboveEdge 12.0 and aboveInternet Explorer 8.0 and aboveFirefox 1.0 and aboveOpera 4.0 and aboveApple Safari 1.2 and above Comment More infoAdvertise with us A AlieaRizvi Follow Improve Article Tags : JavaScript Similar Reads HTML | DOM Style letterSpacing Property The Style letterSpacing property in HTML DOM is used to set the space between the characters. This property allows to set the required space between characters and also used to returns the space between characters. Syntax: It returns the letterSpacing property.object.style.letterSpacingIt used to se 2 min read HTML DOM Style minHeight Property The minHeight property in HTML DOM is used to set or return the minimum height of an element. This property affects only on block-level elements, absolute or fixed position elements. Syntax: It returns the minHeight property.object.style.minHeightIt is used to set the minHeight Property.object.style 2 min read HTML | DOM Style counterReset Property The Style counterReset property in HTML DOM is used to create or reset counters. This property is used with the counterincrement property and the content property.Syntax: It is used to return the counterReset property. object.style.counterResetIt is used to set the counterReset property. object.styl 1 min read HTML | DOM Style borderWidth Property The borderWidth property in HTML DOM is used to set or return the width of the border element. Syntax: It is used to set the border of width. object.style.borderWidth = valueIt returns the border width property. object.style.borderWidth Return Value: It returns the selected border element with the g 4 min read HTML | DOM Style justifyContent Property The style justifyContent property in HTML DOM is used to align the items horizontally when they are not able to use all the available space. It is used to set the position of the element. By default, the items are positioned at the beginning of the container. Syntax: It returns the justifyContent pr 3 min read HTML DOM Samp Object The Samp Object in HTML DOM is used to represent the <samp> element. The <samp> element can be accessed by using the getElementById() method. Syntax: document.getElementById("ID"); Where ID is assigned to the <samp> tag. Example 1: In this example, we will use the DOM Samp Object. 1 min read HTML DOM OptionGroup Object The HTML DOM OptionGroup object represents the <optgroup> element, used to group related options within a dropdown list (<select>). It helps organize options with a label for better user experience in forms. Property Values: This object contains two property values which are listed below 2 min read HTML DOM execCommand() Method The DOM execCommand() method in HTML DOM is used to execute a command specified by the user on the editable selected section. Syntax:document.execCommand( command, showUI, value )Parameters: This method accepts three parameters which are listed below:command: This parameter hold the name of command 3 min read HTML | DOM Style left Property The Style left property is used for setting or returning the left position of a positioned element. The Style left property is used for specifying the left position of the elements including padding, scrollbar, border, and margin. Syntax : To get the property:object.style.leftTo set the propertyobje 2 min read HTML | DOM Quote Object The Quote Object in HTML DOM is used to represent the HTML <q> element. The quote element can be accessed by using getElementById() method.Property Value: It contains single attribute value cite. This attribute is used to set or return the value of the cite attribute in a <q> element.Syn 2 min read Like