-
Print
-
DarkLight
-
PDF
How to add accordion in Markdown?
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
- Go to the desired Markdown article in the editor
- 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>
- Replace the
Accordion_name
text with the desired accordion name - Replace the
Accordion_content
text with the desired accordion content - 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?