Skip to content

Commit 6055b65

Browse files
committed
Closes academicpages#146 with information the details HTML tag
1 parent 7d4a7a7 commit 6055b65

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

_pages/markdown.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,30 @@ or R:
210210
print("Hello World!", quote = FALSE)
211211
```
212212

213-
### Strike Tag
213+
### Details Tag (collapsible sections)
214+
215+
The HTML `<details>` tag works well with Markdown and allows you to include collapsible sections, see [W3Schools](https://www.w3schools.com/tags/tag_details.asp) for more information on how to use the tag.
216+
217+
<details>
218+
<summary>Collapsed by default</summary>
219+
This section was collapsed by default!
220+
</details>
221+
222+
The source code:
223+
```HTML
224+
<details>
225+
<summary>Collapsed by default</summary>
226+
This section was collapsed by default!
227+
</details>
228+
```
229+
230+
Or, you can leave a section open by default by including the `open` attribute in the tag:
231+
232+
<details open>
233+
<summary>Open by default</summary>
234+
This section is open by default thanks to open in the &lt;details open&gt; tag!
235+
</details>
214236

215-
This tag will let you <strike>strikeout text</strike>.
216237

217238
### Emphasize Tag
218239

@@ -244,6 +265,10 @@ This tag styles large blocks of code.
244265

245266
<q>Developers, developers, developers&#8230;</q> &#8211;Steve Ballmer
246267

268+
### Strike Tag
269+
270+
This tag will let you <strike>strikeout text</strike>.
271+
247272
### Strong Tag
248273

249274
This tag shows **bold text**.

0 commit comments

Comments
 (0)