Commit a78234a3 authored by Deimos's avatar Deimos

Text formatting: add <details> + <summary>

parent d2e93d00
......@@ -209,3 +209,27 @@ Strikethrough text can be created with markdown, but you can also (optionally) s
### Superscript and subscript
You can add superscript and subscript text using the `<sup>` and `<sub>` tags, respectively. For example: `E = mc<sup>2</sup>` or `H<sub>2</sub>O`.
### Expandable sections
You can create an expandable (and collapsible) section of text by placing all the content you want to be expandable inside a `<details>` tag. This will have a default label ("Details" in Firefox), but you can set your own label by including a `<summary>` tag inside, containing the label you want to use. For example:
```html
<details>
<summary>Click to view the hidden text</summary>
Here's all the hidden text.
It can have **markdown** in it too.
</details>
```
Which will produce:
<details>
<summary>Click to view the hidden text</summary>
<p>Here's all the hidden text.</p>
<p>It can have <strong>markdown</strong> in it too.</p>
</details>
The section will be collapsed by default, but if you want it to start out expanded, replace the initial `<details>` with `<details open>`.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment