> For the complete documentation index, see [llms.txt](https://docs.codenation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codenation.com/admin-tag-customisations/collapsed-accordions.md).

# Collapsed Accordions

{% hint style="info" %}
Live Demo: [https://campaign.codenation.com/donation\_v2](https://candidate.codenation.com/donation_v2)
{% endhint %}

<figure><img src="https://files.gitbook.com/v0/b/gitbook-legacy-files/o/assets%2F-LeL-FYaRUlvUn8HHUaD%2F-MJ9fkXStaNtkIqDTdPc%2F-MJ9hmOO56GXJKdSMeCH%2FzNucsXrzC4.gif?alt=media&#x26;token=857817d3-1aca-447f-976c-5d51ab60ee55" alt="" width="563"><figcaption><p>What is an accordion?</p></figcaption></figure>

## Adding a Collapsed Accordion:

1. Navigate to the basic content field of a page you want the accordion to display and add 2 horizontal lines (`<hr>`) above the start of where you want the the accordion to show.&#x20;
2. Continue building the accordion by repeating the pattern of separating headings from content using 2 horizontal lines (`<hr>`). E.g.

<figure><img src="/files/2duXNGSkUK5LPSaXIYmc" alt="How to add an accordion inside a pages content" width="563"><figcaption><p>How to add an accordion inside a pages content</p></figcaption></figure>

3. Save the content and preview the result.

{% hint style="info" %}
To alternate the background color and headings of the accordion using your theme colors, add the 'Admin Colored Accordion' tag to the tags list for the page featuring the accordion content. This tag will dynamically style the accordion headers and panels, creating an alternating color scheme based on your theme's color palette.
{% endhint %}
