Using display:none is not SEO-friendly. The following way allows the hidden content to be searchable. Adding the transition-delay ensures any links included in the hidden content is clickable.
.collapse > p{
cursor: pointer;
display: block;
}
.collapse:focus{
outline: none;
}
.collapse > div {
height: 0;
width: 0;
overflow: hidden;
transition-delay: 0.3s;
}
.collapse:focus div{
display: block;
height: 100%;
width: 100%;
overflow: auto;
}
<div class="collapse" tabindex="1">
<p>Question 1</p>
<div>
<p>Visit <a href="https://stackoverflow.com/">Stack Overflow</a></p>
</div>
</div>
<div class="collapse" tabindex="2">
<p>Question 2</p>
<div>
<p>Visit <a href="https://stackoverflow.com/">Stack Overflow</a></p>
</div>
</div>