CSS
.sample table {
border: 1px solid gray;
margin: 1em;
}
.sample caption {
font-weight: bold;
}
.sample td {
border: 1px solid gray;
background-color: #cc9999;
}
.sample-show td {
empty-cells: show;
}
.sample-hide td {
empty-cells: hide;
}
HTML
<div class="sample">
<table class="sample-default">
<caption>default</caption>
<tr><td>AAA</td><td></td></tr>
<tr><td>AAA</td><td>AAA</td></tr>
</table>
<table class="sample-show">
<caption>show</caption>
<tr><td>AAA</td><td></td></tr>
<tr><td>AAA</td><td>AAA</td></tr>
</table>
<table class="sample-hide">
<caption>hide</caption>
<tr><td>AAA</td><td></td></tr>
<tr><td>AAA</td><td>AAA</td></tr>
</table>
</div>
表示