What about using a parameter?
like this :
http://localhost/result.html?show=contentA
  
http://localhost/result.html?show=contentB
or use jquery to change element
So instead of loading a new page the link is change the element you want..
On below sample I will change the image on a webpage :
<img id="thechange" src="/images/test1.jpg"/>
the link is like this :
<button onclick="change('Test2.jpg')" value="Change2"/>
<button onclick="change('Test3.jpg')" value="Change3"/>
<button onclick="change('Test1.jpg')" value="Change1"/>
The script is like below :
<script>
function change(imageName)
{
  $("#thechange").attr("src","/images/"+imageName)
}
</script>
Third option : Using pure css
(copying the answer from here
Try using css like this :
.collapse{
  cursor: pointer;
  display: block;
  background: #cdf;
}
.collapse + input{
  display: none; /* hide the checkboxes */
}
.collapse + input + div{
  display:none;
}
.collapse + input:checked + div{
  display:block;
} 
Html part :
<label class="collapse" for="_1">Collapse 1</label>
<input id="_1" type="checkbox"> 
<div>Content 1</div>
<label class="collapse" for="_2">Collapse 2</label>
<input id="_2" type="checkbox">
<div>Content 2</div>
Hope this is what you need
 
        
        
result
– Chinchan Feb 16 '21 at 01:17