Spoilers

Blurred text that reveals on click for hiding answers and solutions


Spoilers

Spoilers hide text behind a blur effect. Readers click to reveal the content. Perfect for quiz answers, exercise solutions, and surprise content.

Basic Usage

The answer to life, the universe, and everything is 42.

Syntax:

The answer is ||hidden text||.
Markdown

Multiple Spoilers

You can use multiple spoilers in the same paragraph:

The three primary colors are red, blue, and yellow.

With Formatted Text

What is the output of 2 + 2 in JavaScript? The answer is `4`.

Use Cases

Quiz answers:

Q: What does HTML stand for? A: HyperText Markup Language

Q: Which CSS property changes text color? A: `color`

Exercise solutions:

Complete the function: `return a + b;`

Best Practices

  • Use spoilers for content the reader should try to figure out before seeing the answer
  • Keep spoiler content short --- a word, phrase, or short sentence
  • Don't put critical information behind spoilers that the reader needs to proceed