Français
← Anatomy of a product card — from 87 to 38 elements, 0 divs

Interactive demo

Sandbox — Anatomy of a product card

Edit the HTML and CSS of each version, then click "Apply" to see the result. Product photos have been replaced with placeholders to protect the brand's image, which makes the pagination dots visible in the original version.

Original vs reworked
OriginalReworkedReduction
HTML elements8738−56 %
<div> tags270−100 %
Accessibility issues80−100 %

Original

Original version — 87 elements, 27 divs

This card contains intentional accessibility issues — this is the code as retrieved.

original-card.html

Try the keyboard: most elements stay out of reach.

Reworked

Reworked version — 38 elements, 0 divs

Same render, but semantic HTML: keyboard-navigable and correctly announced by screen readers.

reworked-card.html

Try the keyboard: image, title and favourite are all reachable.