Skip to main content


This is an interesting #HTML proposal from @Seirdy

Should there be a `<spoiler>` element?

https://seirdy.one/posts/2023/11/12/spoiler-element/

My heart says yes. HTML should reflect what people are actually doing on the web. How they write. The features they invent.

But my head says it is a duplicate of `<details>` albeit non-block level.

in reply to Terence Eden

100% yes. The greatest failure of HTML is that it never followed behind real world usage, codifying common patterns. Even JS did this after letting jquery lead the way.
in reply to Charlie

FWIW the ticket is here: https://github.com/whatwg/html/issues/9926
in reply to Terence Eden

A related Open UI issue: https://github.com/openui/open-ui/issues/772

There are many nuances to spoiler-type things, aside from the inline-block level difference from details.