Example · Beginner

Responsive feature-card grid

A card collection that uses article structure, content-led breakpoints, equal gaps, and a single-column narrow layout.

Published
Last checked

What this demonstrates

The cards are a collection of short standalone explanations. CSS Grid creates columns only when space permits.

Reviewed static previewOpen full preview

Semantic contract

Each card has a heading and coherent content. The entire card is not made clickable, which avoids nested-control and ambiguous-focus problems.

Use an article when a card is a self-contained item that could be understood outside the grid. A plain div may be enough for purely presentational groups. The grid itself does not need an ARIA role: ordinary document structure already exposes the headings and reading order.

Heading levels should follow the surrounding page. In this example the collection has an H1 and each card begins with an H2. If the grid sits below an H2 section heading on another page, its card titles may need H3 elements instead.

Layout mechanics

The grid collapses to one column below the content’s comfortable width. Text can zoom without clipping or overlap.

repeat(3, minmax(0, 1fr)) gives the three columns equal access to available space and lets long text shrink without forcing overflow. The breakpoint is based on the point where the card content becomes uncomfortable, not on a particular device name. Equal gaps create rhythm without hard-coded card heights.

Avoid truncating descriptions to make the rows line up. Natural-height cards are more resilient to translation, text zoom, and user font settings. If a design needs aligned actions, use an internal card layout while allowing the overall card to grow.

If each card leads somewhere, add one descriptive anchor in that card. The anchor text should name the destination or action. Stretching a pseudo-element over the whole card can create surprising click targets, obscure text selection, and conflict with future controls.

Do not place buttons, checkboxes, or a second link inside an anchor. If the card needs several actions, keep the card a non-interactive container and expose each control normally.

Content quality checks

A card title should communicate a distinct benefit or concept. Its description should answer what the item is and why it matters without relying on a nearby icon. Remove repeated filler such as “powerful,” “seamless,” or “best in class” unless the page supplies evidence.

The set should remain understandable when icons fail, color is removed, or the cards appear in a single column. Visual symmetry is secondary to meaningful differences between the choices.

Verification checklist

  • Read the page with CSS disabled and confirm the sequence still makes sense.
  • Zoom text to 200% and check that no copy is clipped.
  • Test 320, 768, and 1440 CSS pixel widths without horizontal scrolling.
  • Confirm each heading is unique and in the correct hierarchy.
  • Keyboard-test every link or control added to a card.
  • Check forced colors so borders and focus indicators remain perceivable.

Known limitation

If cards become navigation choices, add one descriptive link inside each card and keep its focus indicator visible.