It's all in the <detail> & <summary>
Accordions and “read more” toggles with built-in keyboard support and zero JS.
Add the open attribute to expand by default. Give several the same name, and they behave as an exclusive accordion.
Test out the accordion with CodePen: https://codepen.io/precodecamp/pen/YPNNGKX
5
0 comments
Rob Vanarsdall
7
It's all in the <detail> & <summary>
The Code Zone Skool
skool.com/the-code-zone
Beginner-friendly community to learn Python, HTML, CSS, & JavaScript. We help you become a full-stack developer and offer 1:1 code coaching.
Leaderboard (30-day)
Powered by