CSSのempty-cellsは、表(テーブル)のセルが空の場合に表示するかどうかを指定するプロパティです。
empty-cells: display
値 | 意味 |
---|---|
show | 表示する |
hide | 表示しない |
inherit | 継承 |
show
以下に示す要素に対して、empty-cells プロパティを適用できる。
<table border="1" style="empty-cells: show">
<tr>
<td>first</td>
<td></td>
</tr>
<tr>
<td></td>
<td>second</td>
</tr>
</table>
first | |
second |
<table border="1" style="empty-cells: hide">
<tr>
<td>first</td>
<td></td>
</tr>
<tr>
<td></td>
<td>second</td>
</tr>
</table>
first | |
second |
World Wide Web Consortium (2025) Cascading Style Sheets (CSS) Level 2