GitHub Wiki pages support GitHub Flavored Markdown. Read more about GitHub flavored markdown here:
However, there is no direct method to add a spoiler text in GitHub Flavored Markdown. But, there’s a workaround!
Approach: Markdown Supports HTML Blocks in it. So, we can use HTML’s <details> and <summary> tag to create a spoiler text. The heading of the Spoiler Alert can be specified within the <summary> tag. The rest of the spoiler must be within the <details> tag. Only clicking on the “Spoiler Ahead” heading will reveal the spoiler. The text within the summary tag is the Spoiler Heading. Code, Images, Links, etc can be used following the GitHub flavored markdown, within the details tag.
Example:
html
<!DOCTYPE html> <head> <head> <title> “spoiler” text in github wiki pages </title> </head> <body> <details> <summary>GeeksforGeeks</summary> A Computer Science Portal for Geeks </details> </body> </html> |
Output: The <details> tag along with the <summary> tag creates the following output in markdown.

Note: The Above Outputs has been directly generated from GitHub Wiki Pages markdown preview.
Recommended Posts:
- How to make text input non-editable using CSS?
- How to make a blinking text using jQuery ?
- How to make a text input non-editable using jQuery ?
- How to get the number of pages in a PDF document using PHP ?
- How to select all text in HTML text input when clicked using JavaScript?
- Using GitHub with SSH (Secure Shell)
- Text Animation with changing the color of the text using HTML & CSS
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- How to replace text with CSS?
- How to Set the Gap Between Text and Underlining using CSS ?
- How to check if ul has li with the given text ?
- Working with Text in R
- How to use text as background using CSS ?
- CSS | Text Effects
- How to get the value in an input text box using jQuery ?
- jQuery | text() Method
- jQuery | :text Selector
- How to truncate text in Angular2?
- CSS | text-overflow Property
- CSS | text-indent Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

