A collapsible section is a <details> block: a clickable title with content the reader opens when they want it. The Collapsible Block control on the editor toolbar wraps the current block in one, and its settings dialog — Collapse Settings — carries a Title field and a Collapsed by default checkbox. This page is the markdown underneath, which is what you need when the content is coming from an AI client, an import, or a template rather than from the toolbar.
Closed by default
Three plus signs, a space, and the clickable title. The closing line repeats the marker on its own:
+++ Click to expand
Hidden content.
+++How it renders
Click to expand
Hidden content.
Open by default
Replace the last plus with a > and the section renders already expanded. Readers can still collapse it.
++> Open by default
Visible content.
++>How it renders
Open by default
Visible content.
Inserting a collapsible from the toolbar gives you an open one — the collapsed-by-default checkbox starts unticked — so a block you insert and never touch is stored as +++>, not +++. Tick the box in the dialog above to close it. Block types and settings covers the rest of that panel.
Markers, honestly
The parser accepts any run of three or more marker characters, and the closing marker has to match the opening one exactly. The forms this page teaches are the three-character ones. The editor writes four:
| State | Documented form | What the editor writes | Both parse? |
|---|---|---|---|
| Closed | +++ | ++++ | Yes |
| Open | ++> | +++> | Yes |
The reason is nesting. The serializer sizes a block’s marker as 3 + the deepest nesting inside it, and then adds the final + or > on top — so a plain collapsible comes out at four characters and one containing another comes out at five. Both forms parse and render identically, so this is a spelling difference and not a break, but any example you copy out of a real page will have four characters in it and that is not a typo.
A collapsible also needs content. An opening and closing marker with nothing between them is not a collapsible — the two lines render as a paragraph of literal plus signs.
Nesting
To put a collapsible inside a collapsible, give the outer one more marker characters so the inner one cannot close it:
++++ Outer section
Some content.
+++ Inner section
Nested content.
+++
++++How it renders
Outer section
Some content.
Inner section
Nested content.
Collapsibles hold block content generally — paragraphs, lists, tables, images, code fences, alerts and diagrams all work inside one.
Titles
Everything between the marker and the end of the line is the title, and it is parsed as inline markdown, so emphasis, code spans and links all work in the clickable summary:
++> Advanced **options** for the `build` command
Content.
++>How it renders
Advanced options for the build command
Content.
Attributes, and their two limits
Attributes go at the end of the opening line, after the title. Collapsibles read them with their own parser, which is stricter than the one every other block uses, in two specific ways.
Shorthand does not work. .class and #id are silently ignored — the braces disappear from the title, so nothing looks wrong, and no attribute is set. Write the full key="value" form.
A value cannot contain a space. The parser splits the brace content on whitespace before it looks at quotes, so a two-word value is cut at the first space.
| You write | What it sets |
|---|---|
{#advanced} | nothing |
{id="advanced"} | id="advanced" |
{class="wide box"} | class="wide" — the second word is dropped |
{class="wide-box"} | class="wide-box" |
Note that a title attribute here is the HTML title attribute on the <details> element — a hover tooltip. The clickable summary text is the words after the marker, not an attribute.
Good uses
Collapsed content is in the page’s HTML whether or not it is open, so it is searchable, linkable and printable — nothing is loaded on demand. Modern browsers will also open a <details> to reach a match when a reader uses in-page find.
Page types can switch collapsibles off — on blogs only
Collapsible blocks are one of nine formatting features that can be turned off per page type, and they are off by default. The switch exists for posts-type page types alone: on a documentation or api page type it is inert on every surface — the API skips the check, the toolbar shows the control, and Settings does not render the toggle block at all. There is nothing to find on a documentation set, and nothing hiding it.
On a posts-type page type the gate applies to API and MCP writes as well as to the toolbar, and rejects with a 400 naming the feature:
This page type does not allow: collapsible blocks. Allowed formatting features: code blocks.Formatting by page type has the full list of switches and where to set them.