How to add accordion in Markdown?
  • 03 Aug 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

How to add accordion in Markdown?

  • Dark
    Light
  • PDF

You would like the content to appear as an accordion in some instances. Since there is no option to add it right away, you can try the below workaround to add an accordion in Markdown.

Solution

  1. Go to the desired Markdown article in the editor
  2. Paste the below code in the desired location where you want the accordion to appear
<details>
    <summary>Accordion_name</summary>
    <p>Accordion_content</p>
    </details>
  1. Replace the Accordion_name text with the desired accordion name
  2. Replace the Accordion_content text with the desired accordion content
  3. The output would appear as below
What is Document360?

With Document360, you can build a world-class, self-service knowledge base for your SaaS products.

Click the accordion name to expand/collapse it


Was this article helpful?