Expandable sections

Is it possible like you can in HTML? I know that this is hosted by Vanilla and uses markdown, but you might be able to edit it. It would really help when sharing long chuncks of code.
Thanks!

Show/Hide

This text was hidden

Thats what happens with this code:



<a onclick ="javascript:ShowHide('HiddenDiv')" href="javascript:;" >Show/Hide</a>

<div class="mid" id="HiddenDiv" style="DISPLAY: none" >
This text was hidden
</div>

<script language="JavaScript">
function ShowHide(divId)
{
if(document.getElementById(divId).style.display == 'none')
{
document.getElementById(divId).style.display='block';
}
else
{
document.getElementById(divId).style.display = 'none';
}
}
</script>