The New Details And Summary Tag

With this details-tag you can create foldable / collapsible content:

  <summary>This is a summary of the collapsible content</summary>
  And this is the very long content..
  It can have <strong>HTML</strong>-tags in it as well!

This is the content when it is collapsed:

And this is the content when it is not collapsed:

It’s handy for hiding logs in GitHub issues but you can still add them in a nice way for people who need them.

Browser support on desktop is not so great yet, but on mobile it is:


Happy coding! – Found a mistake or a typo? Please submit a PR to my GitHub-repo.

Like this post? Follow @adriaandotcom on X