Skip to content

Commit

Permalink
Add section on collapsible section that is open by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbear authored Oct 5, 2024
1 parent d91cd65 commit a546aea
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,25 @@ 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)

Check warning on line 44 in content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md

View workflow job for this annotation

GitHub Actions / lint-content

Images alternate text should be between 40-150 characters

Image alternate text is 169 characters long.

## Creating a collapsible section that is open by default

Check failure on line 46 in content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md

View workflow job for this annotation

GitHub Actions / lint-content

Headings should be surrounded by blank lines

Expected: 1; Actual: 0; Below.
````markdown
<details open>

<summary>Tips for collapsible sections that are open by default</summary>

### You can add a header

You can add text within a collapsed section.

You can add an image or a code block, too.

```python
print("Hello World")
```

</details>
````

## Further reading

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

0 comments on commit a546aea

Please sign in to comment.