kirupa.com

06 / COMPONENTS / READING

FAQ

A short list of real questions people ask about an article's topic, each a collapsible native details with a site icon, placed just above the Conclusion. Its text stays in the page and matches the page's FAQPage JSON-LD.

Reading1 variantcomponent

Live preview

LOCAL PREVIEW

Activate this specimen to load its real styles. No saved preferences change.

Notes

Use only where a real question-and-answer exists: 4-6 questions people actually ask (search queries, common confusions), each answered in 2-4 sentences in the article's casual voice using only what the article says. Place it as a section of article#tutorialInformation directly above the Conclusion H2, with its own h2 id="faq" ("Frequently Asked Questions"). Each question is its own native details without open, so it starts collapsed and opens with a click, tap, Enter, or Space and no JavaScript; never hide answers with script, hidden, or display: none. Questions are Title Case and plain text inside span.faq__text; keep links and other markup out of answers so the visible text and the JSON-LD stay identical. Give each question a distinct, fitting site icon set inline as --icon: url('https://www.kirupa.com/icon/<code>.svg') so the header's icon swap themes it. It shares the TL;DR's accent rule, chevron (instant under reduced motion), and 1.2em text size; don't add boxes, backgrounds, or inline colors. Add a separate application/ld+json block (not the managed site-structured-data one) with an FAQPage whose Question name and Answer text equal the visible question and answer text exactly; python3 tools/site_metadata.py --check fails when they drift. Mirror it in the Markdown and plain-text twins as a ## Frequently Asked Questions section with each question in bold followed by its answer.

Usage

FAQ

Example composed with native selectors / Rendered markup
<section class="faq" aria-labelledby="faq">
  <h2 id="faq">Frequently Asked Questions</h2>
  <div class="faq__list">
    <details class="faq__item" style="--icon: url('https://www.kirupa.com/icon/1f524.svg');">
      <summary class="faq__question"><span class="faq__text">A Question People Actually Ask?</span></summary>
      <p class="faq__answer">A 2-4 sentence answer drawn only from the article.</p>
    </details>
    <!-- 4-6 items in all -->
  </div>
</section>

Anatomy

Selectors#mainContent .faq .faq__list#mainContent .faq .faq__question#mainContent .faq .faq__answer

Properties--linkForeground--bodyText--structureBorder

Sources

Agent Instructions / components

You are composing a current-shell KIRUPA page. Read /design/components.json and the relevant entry in /design/sections/components.md for selectors, variants, source files, and usage. Start from an adjacent working page and reuse its SSI structure and named component classes. When a link needs to look like a link inside the tutorial body, add the blueEmphasis class to its anchor, including in component examples. Style class names, IDs, and code identifiers in explanatory prose with inlineCode. Choose semantic HTML before adding JavaScript. Use visible labels, keyboard-operable controls, clear focus, and explicit loading/error/empty states. Keep forms inert in documentation specimens and label demo output. Preserve the article's reading rhythm and code overflow containment. Verify the component in each visual style and both modes. Do not initialize onboarding, tracking, a live chat request, or a subscription in a preview. Keep reference and navigation descriptions short and factual. Follow WCAG 2.2 AA for new or changed content: semantic HTML, keyboard access, visible focus, readable contrast in every theme, text alternatives, labeled controls, and explicit errors. Support zoom/reflow, respect reduced motion, and keep sound optional. Read /design/sections/accessibility.md for acceptance checks. Report unresolved barriers; automated checks alone do not establish conformance.