Skip to content

Commit

Permalink
Add example collapsible section that is open by default (#34837)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 7, 2024
1 parent 3d231ae commit f880b98
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Optionally, to make the section display as open by default, add the `open` attribute to the `<details>` tag:

```html
<details open>

## Further reading

* [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
Expand Down

0 comments on commit f880b98

Please sign in to comment.