HTML4 HTML5
Creates an interactive disclosure widget to toggle additional content. Content is hidden by default; only the summary (defined via <summary>) remains visible.
Both opening and closing tags are required.
Attributes:
open - Expands the section by default on page load.
Code:
The browser will interpret this code as follows:
This is hidden content appearing after clicking the header. The <details> tag creates a native accordion without JavaScript.