<input type="checkbox" class="toggle">
<div class="element">
This content will be shown or hidden.
</div>
.element {
display: none;
}
.toggle:checked + .element {
display: block;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.