The summary tag

The summary tag specifies a title for the datalist tag, which creates a spoiler in HTML. With summary you can collapse and expand the contents of the datalist tag.

Example

Let's see how the details tag works:

html<details>
  <summary>click me</summary>
  hidden text
</details>

Результат:

See also

  • attribute hidden,
    which hides blocks on the page