1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Add example collapsible section that is open by default (#34837)

Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
This commit is contained in:
Michael Bear
2024-10-07 16:35:55 -04:00
committed by GitHub
parent 3d231ae208
commit f880b98d8d

View File

@@ -43,6 +43,11 @@ After a reader clicks {% octicon "triangle-right" aria-label="The right triangle
![Screenshot of the Markdown above on this page as rendered on {% data variables.product.prodname_dotcom %}, indicating that a collapsed section can contain headers, sentences of text, images, and code blocks.](/assets/images/help/writing/open-collapsed-section.png) ![Screenshot of the Markdown above on this page as rendered on {% data variables.product.prodname_dotcom %}, indicating that a collapsed section can contain headers, sentences of text, images, and code blocks.](/assets/images/help/writing/open-collapsed-section.png)
Optionally, to make the section display as open by default, add the `open` attribute to the `<details>` tag:
```html
<details open>
## Further reading ## Further reading
* [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/) * [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)