June 2025
Beginner
817 pages
31h 30m
English
HTML also provides elements for interactive content. Interactive elements can be changed and adjusted by visitors or can be interacted with in other ways.
The details element allows you to expand and collapse page content. This can be useful if there’s too much detail and information at once, and you don’t want to overwhelm visitors with it. They can then expand and collapse the additional information by clicking on a summary element. Until now, such a task had to be implemented with JavaScript.
Let’s look at a simple example:
... Lorem ipsum dolor sit amet ... <details> <summary>More information</summary> <blockquote>Lorem ipsum dolor ...
Read now
Unlock full access