Collapse section with a button at the bottom?

I have several pages with collapsible sections (technically headings, I guess). The content of those sections is typically very long, and the page starts to look messy and overwhelming with everything open. I’m wanting to put a “Close Section” button at the bottom of all the content in the section that just collapses the section and cleans up the page.