<div class="visible">Visible</div>
<div class="hidden">Hidden</div>
<div class="visible">Visible</div>
<div class="collapse">Collapse</div>
<div class="visible">Visible</div>
<table>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td>Data 1</td>
<td>Data 2</td>
<td>Data 3</td>
</tr>
<tr class="collapse">
<td>Data 4</td>
<td>Data 5</td>
<td>Data 6</td>
</tr>
<tr>
<td>Data 7</td>
<td>Data 8</td>
<td>Data 9</td>
</tr>
</table>
div {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: x-large;
text-align: center;
padding: 20px;
border: 1px solid orange;
background-color: bisque;
}
.visible {
visibility: visible;
}
.hidden {
visibility: hidden;
}
.collapse {
visibility: collapse;
}
table {
border-collapse: collapse;
width: 100%;
margin-top: 20px;
}
th,
td {
border: 1px solid black;
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.