Project: Responsive Media-Rich Catalog
Plan a browsable catalog
Group items by category and make each product an article with a descriptive heading. Include price and specifications as text. Use a description list for name-value pairs, not a table unless the data is tabular.
<section> <h2>Journals</h2> <article> <h3>Seed journal</h3> <p>Price: €12</p> <dl> <dt>Pages</dt> <dd>48</dd> </dl> </article></section>The product has a readable title, price and specification.
Choose responsive imagery
Use picture when a narrow crop better fits small screens. Keep img as the fallback with meaningful alternative text. Supply intrinsic dimensions and responsive CSS; if crops differ in aspect ratio, set dimensions on the source too to help reserve space. Here the source and fallback are original inline SVG fixtures, not remote assets.
<picture> <source width="160" height="160" media="(max-width: 480px)" srcset="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Crect%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22%23dbeafe%22%2F%3E%3Crect%20x%3D%2225%22%20y%3D%2225%22%20width%3D%22110%22%20height%3D%22110%22%20rx%3D%228%22%20fill%3D%22%23166534%22%2F%3E%3Cpath%20d%3D%22M45%2050H115M45%2070H115%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%2F%3E%3C%2Fsvg%3E"> <img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22160%22%20viewBox%3D%220%200%20320%20160%22%3E%3Crect%20width%3D%22320%22%20height%3D%22160%22%20fill%3D%22%23dbeafe%22%2F%3E%3Crect%20x%3D%2290%22%20y%3D%2225%22%20width%3D%22140%22%20height%3D%22110%22%20rx%3D%228%22%20fill%3D%22%23166534%22%2F%3E%3Cpath%20d%3D%22M115%2050H205M115%2070H205%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%2F%3E%3C%2Fsvg%3E" alt="Green seed journal" width="320" height="160" style="max-width:100%;height:auto"></picture>The browser can choose the alternate crop while preserving the same subject.
Assemble the catalog card
Keep optional information in a native disclosure and essential facts visible. Check the card at narrow and wide widths. The standalone catalog also has a local video demo with captions and a transcript; those files require serving the package locally.
<header> <nav aria-label="Catalog"> <a href="#journals">Journals</a> </nav></header><main> <h1>Garden shop</h1> <section id="journals"> <h2>Journals</h2> <article> <h3>Seed journal</h3> <picture> <source width="160" height="160" media="(max-width: 480px)" srcset="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Crect%20width%3D%22160%22%20height%3D%22160%22%20fill%3D%22%23dbeafe%22%2F%3E%3Crect%20x%3D%2225%22%20y%3D%2225%22%20width%3D%22110%22%20height%3D%22110%22%20rx%3D%228%22%20fill%3D%22%23166534%22%2F%3E%3Cpath%20d%3D%22M45%2050H115M45%2070H115%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%2F%3E%3C%2Fsvg%3E"> <img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22160%22%20viewBox%3D%220%200%20320%20160%22%3E%3Crect%20width%3D%22320%22%20height%3D%22160%22%20fill%3D%22%23dbeafe%22%2F%3E%3Crect%20x%3D%2290%22%20y%3D%2225%22%20width%3D%22140%22%20height%3D%22110%22%20rx%3D%228%22%20fill%3D%22%23166534%22%2F%3E%3Cpath%20d%3D%22M115%2050H205M115%2070H205%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%2F%3E%3C%2Fsvg%3E" alt="Green seed journal" width="320" height="160" style="max-width:100%;height:auto"> </picture> <p>Price: €12</p> <dl> <dt>Pages</dt> <dd>48</dd> </dl> <details> <summary>Product details</summary> <p>Recycled paper.</p> </details> </article> </section></main>The essential facts remain visible even when details are closed.
Common mistakes and practice
Check the alternative text, media controls and transcript, headings, link targets and narrow viewport. Use actual browser currentSrc to observe source selection; do not assume every responsive image hint forces a particular resource. See projects/catalog.html.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Project: Responsive Media-Rich Catalog — Knowledge Check
Apply the project design and review concepts taught in this lesson.
When is picture useful?
Which element provides the picture fallback?
Where should the product price be placed?
What should optional care instructions use?
What helps users access spoken video information?