---
updatedAt: 2026-07-28T07:59:19.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Creating an AMP Accordion

<HTMLBlock>{`
<p align="right" style="color: gray;">
  <a href="https://docs-ua.esputnik.com/docs/yak-stvoryty-amp-akordeon" style="color: gray; text-decoration: none;"><em>
    Read this article in Ukrainian ⮕
  </em></a>
</p>
`}</HTMLBlock>

An **Accordion** is an interactive block that lets you expand or collapse parts of content inside an email.

Use it when you need to:

* reduce the amount of visible content;
* move additional information into expandable sections;
* show details only after user interaction.

<Image src="https://files.readme.io/2fe7449cf90085ed3ce3fc04f3b53c27ecc812afe82578be41012f83528b91d9-image01.gif" alt="Email accordion block with four collapsed sections and a cursor hovering over Smart home & accessories, with a Discounts section and product cards below" align="center" width="80%" />

<Callout icon="🚧" theme="warn">
  ### Important

  To send AMP-powered emails, you must first <Anchor target="_blank" href="https://developers.google.com/workspace/gmail/ampemail/register">register with Google as a dynamic sender</Anchor>. This registration process requires you to submit your sending domain and a real AMP email sample to Google for review. Until approved, AMP content will not render for Gmail recipients.
</Callout>

## Adding the Block

1. <Anchor target="_blank" href="https://docs.esputnik.com/docs/adaptive-email-builder-review#creating-a-message">Create a new email</Anchor> or open an existing one.
2. Add the **Accordion** block to the template.

<Image src="https://files.readme.io/d25b9bd79faa61c7185ae474c9c304e10a77a34b8843c586808376474369bf7c-image.png" alt="Email editor with the Accordion block icon in the left toolbar boxed in red, and a red arrow pointing to a Section 1 placeholder dropped into the template" align="center" width="80%" />

3. Click the block to open its settings.

### Adding Sections

By default, the accordion contains one section.

To add a new section:

1. Click **+** and enter a **Title**.

<Image src="https://files.readme.io/e30d4582a0734fe02bd1d360fd3c84b224ac9f7cea37be272b85a04cf727bb86-image.png" alt="Accordion block settings panel with the plus button for adding a section and the Section 1 Title field boxed in red, showing Home appliances entered as the title" align="center" width="80%" />

2. Click the content area of the section.
3. Select a block to add.

<Callout icon="📘" theme="info">
  ### Note

  The accordion can contain any type of block.
</Callout>

Let’s look at an example of an accordion with an image.

<Image src="https://files.readme.io/793f7dc00320ad74e5f5ebf8c3ce7141dd138326b808d9582062a7b1d5d3f0dc-image.png" alt="Left toolbar of content blocks boxed in red next to an empty Drop content here area in the expanded Home appliances section, with three collapsed sections below" align="center" width="80%" />

4. Add an image — choose a file from the uploaded images or upload a new one.

<Image src="https://files.readme.io/e085c6d971b061bd548b96f89a6f41774c92e0670b9e4d1ba09176bc7b2a8d5a-image.png" alt="Image gallery panel boxed in red with a Drag-n-drop your image or paste URL area open, next to the accordion's empty Home appliances section" align="center" width="80%" />

<Callout icon="👍" theme="okay">
  ### Recommendation

  Use images of the same size. This helps:

  - keep the layout clean;
  - prevent content shifting;
  - ensure smooth section expansion.
</Callout>

If images have different sizes, edit them in the built-in editor:

* change the scale;
* adjust proportions.

<Image src="https://files.readme.io/f783c4d59f2d91af271c0af39b623c6f8ee0e5241aea130e8fe39478afa68daf-image.png" alt="Image block settings panel with the crop and edit icon boxed in red, next to the accordion's Home appliances section showing an appliances photo" align="center" width="80%" />

## Accordion Settings

### Settings Tab

Controls how sections behave.

* **Expanded.** Defines whether a section appears expanded when the email opens. Configure this separately for each section
* **Gap Between Sections**. Sets the distance between section titles in pixels.
* **Auto-collapsing.** Allows only one section to remain open at a time. Opening a new section closes the previous one.
* **Animated Opening**. Adds a smooth opening and closing effect for sections.

<Image src="https://files.readme.io/c29e716e7e8b1b65cfc1588ad6f570f24a66f2f276077447350d4465359eeb24-image.png" alt="Accordion block Settings tab boxed in red, highlighting the Expanded, Gap Between Sections, Auto-collapsing, Animated Opening, and Hide Element options" align="center" width="80%" />

### Styles tab

Contains visual settings for the accordion: font, colors, title alignment, background borders.

<Image src="https://files.readme.io/1353c4f4e68bca8d7ef43c10a5a502b48ec08b841f27022c854a161506322794-image.png" alt="Accordion block Styles tab boxed in red, highlighting font, size, color, alignment, and border options, with the preview showing colored section title bars" align="center" width="80%" />

## Creating an HTML Version for Clients Without AMP Support

The AMP accordion appears only in clients that support AMPHTML, so create an alternative HTML version of the content. For example, use an **Image** block.

1. Add an **Image** block.
2. Enable the **Include in HTML** version option in the block settings.

<Image src="https://files.readme.io/a51ccb6367d8e0becef2088d5e77f40dc66f7041c6c2e22684dbf791358eb73d-image.png" alt="Image block settings panel with Include in set to HTML boxed in red, next to the appliances image labeled HTML in the accordion section" align="center" width="80%" />

## Preview

1. Click **Preview**.

<Image src="https://files.readme.io/e70d7f690ed8d3411046952ae46a56172634ca2f2e4ed9ea9fecbfba71d3c60b-image.png" alt="Email editor with the Preview button boxed in red in the top toolbar, showing the accordion with a Home appliances section image below" align="center" width="80%" />

2. Switch between the tabs:

* ⚡ **HTML** — the AMP-powered version
* **HTML** — the standard HTML fallback

<Image src="https://files.readme.io/543a2c3eb5dcddcbc4293396997322707b7507b38fe9e56175b6acdf2c31ed7b-image11.gif" alt="Email preview panel with the lightning-bolt HTML tab selected in the top right, showing the collapsed accordion sections and Discounts section" align="center" width="80%" />

Check:

* whether the accordion works correctly;
* whether the HTML version appears properly.

## Checking the AMP Email for Errors

In the preview window, click **Errors** to see the description.

<Image src="https://files.readme.io/4d1a77fcd49f394e00ae6f520fc0e7860c2cd62cb5403647092b6413c63c4c43-image.png" alt="Email preview toolbar with the Errors 43 button boxed in red, and an AMP HTML validation failed dialog listing validation errors below" align="center" width="80%" />

If necessary:

* fix the code in the editor;
* copy the code;
* or open it in Google Playground for validation.

<br />