Collapsible

5 Collapsible Content Rows

Collapsible Content Demo

Click on a row to expand or collapse the content.

This is the content for the first row. You can place any text, images, or other HTML elements here. The text remains hidden until the button above it is clicked.

The **CSS** controls the look and feel, making the buttons blue and the content light blue. The smooth opening and closing is handled by the `transition` property on `max-height`.

The **JavaScript** toggles the `.active` class on the button. This class then tells the CSS to set the `max-height` of the next element (`.content`) to a large value, making it visible.

These are often used for **FAQs (Frequently Asked Questions)**, where you only want to show the answer when the user specifically asks for it, saving screen space.

Feel free to copy this code and change the text inside each `

` tag to whatever content you need for your project!

Powered by Omni Themes