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.
9 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.
TypographyA seven-step type scale built with clamp() and custom properties, plus measure, leading and spacing tokens that you can copy into your own styles.
CardsFour card layouts on one auto-fit grid: stacked, horizontal, a whole-card link and a compact list, with light and dark colours.
TypographyTypography for long text: headings, lists, links, inline code, a quote, a table and a figure set in a comfortable 65-character column.
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.
Data DisplayA table with caption, scoped headers and right-aligned numbers that reflows into labelled stacked cards on a phone, in plain CSS.
MediaTwo stacked local SVG pictures with a range input that moves a divider between them, and the split read out as a percentage.
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.