<details> and <summary> elements<details> creates a native, no-JavaScript disclosure widget — content is hidden by default and revealed on click:
<details>
<summary>What is HTML?</summary>
<p>HTML stands for HyperText Markup Language. It is the standard markup language for creating web pages.</p>
</details>
<summary> toggles the visibility of everything else inside <details>open attribute to expand it by default:<details open>
<summary>Already expanded</summary>
<p>This content is visible when the page loads.</p>
</details>
Great for: FAQs, spoilers, progressive disclosure.
<figure> and <figcaption> elements<figure> wraps self-contained media (images, diagrams, code snippets, charts) that is referenced from the main text. <figcaption> provides a caption:
<figure>
<img src="diagram.png" alt="Network topology diagram" />
<figcaption>Figure 1. A simple star network topology.</figcaption>
</figure>
<figcaption> can be the first or last child of <figure>:
<figure>
<figcaption>Listing 1. Hello World in Python.</figcaption>
<pre><code>print("Hello, World!")</code></pre>
</figure>
The benefit of <figure> over a plain <div> is semantic: it tells browsers, search engines, and screen readers that this media is a discrete unit with its own caption.
<details>
<summary>View the architecture diagram</summary>
<figure>
<img src="architecture.png" alt="System architecture overview" />
<figcaption>High-level overview of the three-tier architecture.</figcaption>
</figure>
</details>
<details> elements for an FAQ.<details> has a <summary>.<details> expanded by default using open.<figure> with an <img>.<figcaption> inside the figure.The <details> element is collapsed by default. Add the open attribute to expand it on load.