Upon loading the page, I want all my paragraph texts to be collapsed. Clicking on the heading should then expand the paragraph text accordingly. Each heading is followed by a single paragraph. As part of my current course, I am unable to utilize JQuery for this functionality. All blocks are enclosed within a div with the class "maincontent". Please refer to the following code snippet:
<div class="maincontent">
<h2>How HowziTO came to be? </h2>
<p>
This website was created by me, a South African who moved to Toronto in my mid 20's. Through the move, I felt unprepared, and at times, alone. Although there are many sites that offer advice to new immigrants,
I thought it would be useful to create a site that is specific to South Africans, given our unique heritage.
So, if you feel like I felt, hopefull this website will help you settle in a little easier.
If you have any suggestions for the site, please feel free to reach out to me using the <a href="About.html">the about page</a>.
</p>
</div>
Your assistance on this matter would be greatly appreciated. Thank you.
I have included a screenshot of my website below. The text under "How HowziTO Came to be?" should remain collapsed until the heading is clicked, expanding the text. The same behavior is desired for the other two headings as well.