empty-cells property in CSS

empty-cells property in CSS

 
It is used to hide the border and the background on the empty cells in the table.
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <html>  
  3.   
  4.      <head>  
  5.           <style type="text/css">  
  6.           table {  
  7.                border-collapse: separate;  
  8.                empty-cells: hide;  
  9.           }  
  10.           </style>  
  11.      </head>  
  12.   
  13.      <body>  
  14.           <table border="2">  
  15.                <tr>  
  16.                     <td>mahak</td>  
  17.                     <td>garg</td>  
  18.                </tr>  
  19.                <tr>  
  20.                     <td></td>  
  21.                     <td>gupta</td>  
  22.                </tr>  
  23.                <tr>  
  24.                     <td>ashima</td>  
  25.                     <td></td>  
  26.                </tr>  
  27.           </table>  
  28.      </body>  
  29.   
  30. </html> 
Output:
 
1.png
Next Recommended Reading CSS Font-Family Property