1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Files
docs/content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md
2022-06-07 16:15:03 -04:00

1.7 KiB

title, intro, versions, redirect_from, shortTitle
title intro versions redirect_from shortTitle
Organizing information with collapsed sections You can streamline your Markdown by creating a collapsed section with the `<details>` tag.
fpt ghes ghae ghec
* * * *
/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections
Collapsed sections

Creating a collapsed section

You can temporarily obscure sections of your Markdown by creating a collapsed section that the reader can choose to expand. For example, when you want to include technical details in an issue comment that may not be relevant or interesting to every reader, you can put those details in a collapsed section.

Any Markdown within the <details> block will be collapsed until the reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %} to expand the details. Within the <details> block, use the <summary> tag to create a label to the right of {% octicon "triangle-right" aria-label="The right triange icon" %}.

<details><summary>CLICK ME</summary>
<p>

#### We can hide anything, even code!

```ruby
   puts "Hello World"
```

</p>
</details>

The Markdown will be collapsed by default.

Rendered collapsed

After a reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %}, the details are expanded.

Rendered open

Further reading