I never new that this is all the HTML that one needs to style like accordian in HTML.
One section:
<details>
<summary>Open the album</summary>
Album interior
</details>Several independent sections:
<details>
<summary>Cover</summary>
Front and back
</details>
<details>
<summary>Insert</summary>
Lyrics and credits
</details>
<details>
<summary>Special cases</summary>
Gatefold spread
</details>
Each opens independently. Newer HTML can also make them behave as a mutually exclusive accordion by sharing a name:
<details name="album-parts">
<summary>Cover</summary>
Front and back
</details>
<details name="album-parts">
<summary>Insert</summary>
Front and back
</details>
Opening one closes the other—still no JavaScript. For Music Trove, however, the single outer <details> currently feels right: open the album, then see everything inside.
- Log in to post comments