{"slug": "github-spoiler-markdown-md", "title": "GitHub spoiler markdown.md", "summary": "The article explains how to create a spoiler warning in Markdown using the HTML `<details>` and `<summary>` tags. It notes that a space is required after the summary tag and that any Markdown, including code blocks, can be placed inside the `<details>` tag as long as it is properly closed.", "body_md": "Spoiler warning\nSpoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details>\ntag... just make sure you close <details>\nafterward.\nconsole.log(\"I'm a code block!\");\n<details>\n<summary>Spoiler warning</summary>\nSpoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the `<details>` tag... just make sure you close `<details>` afterward.\n``` javascript\nconsole.log(\"I'm a code block!\");\n```\n</details>", "url": "https://wpnews.pro/news/github-spoiler-markdown-md", "canonical_source": "https://gist.github.com/jbsulli/03df3cdce94ee97937ebda0ffef28287", "published_at": "2017-12-13 18:38:28+00:00", "updated_at": "2026-05-22 22:35:42.423994+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["GitHub"], "alternates": {"html": "https://wpnews.pro/news/github-spoiler-markdown-md", "markdown": "https://wpnews.pro/news/github-spoiler-markdown-md.md", "text": "https://wpnews.pro/news/github-spoiler-markdown-md.txt", "jsonld": "https://wpnews.pro/news/github-spoiler-markdown-md.jsonld"}}