LayoutFAQ Accordion
An accordion of five questions on details and summary, with an animated chevron and one open at a time through the name attribute.
Ready-to-use HTML, CSS and JavaScript with a live preview. Copy the code or open any snippet in the playground.
4 snippets
LayoutAn accordion of five questions on details and summary, with an animated chevron and one open at a time through the name attribute.
LayoutA two-column article page whose contents list stays in view beside the text on wide screens and folds into a details block on phones.
LayoutA header, a sidebar and a main area on CSS grid with a sticky header and one scrolling region; the sidebar folds behind a button on a narrow shell.
LayoutA site footer with a short brand note, four groups of links that wrap from four columns to two to one, and a bottom bar with a back-to-top link.
Try our online code playground to experiment with these snippets and create your own projects.