Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> table, td { border: 1px solid black; margin: 15px; } </style> </head> <body> <p>Click the button to "hide" or "show" empty table-cells:</p> <button type="button" onclick="hide()">Hide empty cells</button> <button type="button" onclick="show()">Show empty cells</button> <table id="myTable"> <tr> <td>Peter</td> <td>Griffin</td> </tr> <tr> <td>Lois</td> <td></td> </tr> </table> <p><b>Note:</b> Internet Explorer 8 supports the empty-cells property only if a !DOCTYPE is specified.</p> <script> function hide() { document.getElementById("myTable").style.emptyCells = "hide"; } function show() { document.getElementById("myTable").style.emptyCells = "show"; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_emptycells by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:25:23 GMT --> </html>
Result:
Try it Yourself - © w3schools.com