HTML & CSS Wiki

READ MORE

HTML & CSS Wiki

The empty-cells property is used in CSS and certain HTML elements. It specifies how the user agent should render borders and backgrounds around table cells that have no visible content.


Values[]

  • show - Borders and backgrounds should be drawn like normal cells.
  • hide - No borders or backgrounds should be drawn.


HTML example:

<table style="empty-cells:hide;">
      <caption>The Table</caption>
      <tr>
         <th>Table 1</th>
         <th>Table 2</th>
      </tr>
      <tr>
         <td>Has stuff.</td>
         <td></td>
      </tr>
</table>


CSS example:

.contentbox td {
                empty-cells:hide;
}