FAQ with helpfulness vote in HTML and CSS
A native accordion FAQ where each answer asks “Was this answer helpful?”, with a thank-you message and a remembered vote.
Here is an excerpt of this component's code in HTML and CSS. The full code is free for members, ready to copy into your project.
This component also comes in
The code in HTML and CSS
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>FAQ avec vote « utile »</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="demo">
<section class="fvu" data-fvu aria-labelledby="fvu-titre">
<h2 class="fvu-title" id="fvu-titre">Questions fréquentes</h2>document.querySelectorAll("[data-fvu]").forEach((root) => {
const on = (el, type, fn) => el.addEventListener(type, fn);
const KEY = "forge-fvu-votes";
let votes = {};
try {
votes = JSON.parse(localStorage.getItem(KEY) ?? "{}");
} catch {
votes = {};
}
const MESSAGES = {
oui: "Merci pour votre retour !",
non: "Merci, nous allons améliorer cette réponse. Vous pouvez aussi nous écrire avec le lien en bas de page.",:root {
--fvu-card: #ffffff;
--fvu-text: #10233a;
--fvu-muted: #46566b;
--fvu-line: #d5dee8;
--fvu-soft: #f1f6fb;
--fvu-accent: #0b5cad;
--fvu-accent-text: #ffffff;
--demo-bg: #e9eff5;
--demo-text: #10233a;
}
Free component: copy it freely, including for commercial projects.
Other FAQ and accordions components in HTML and CSS
FAQ and accordions components in HTML and CSS
Two-column FAQ
FreeAn introduction and a contact link on the left, expandable questions on the right.
- Tailwind
- React
- CSS
- WordPress

A tight accordion within a single frame, for practical information pages.
- Tailwind
- React
- CSS
- WordPress

FAQ by category
FreeQuestions grouped under subheadings, for long FAQs.
- Tailwind
- React
- CSS
- WordPress

Open card FAQ
FreeAll answers visible at once, presented as a card grid.
- Tailwind
- React
- CSS
- WordPress

Frequently asked questions followed by a card inviting visitors to call or write.
- Tailwind
- React
- CSS
- WordPress

Accordion FAQ
FreeQuestions that expand one by one, with FAQPage structured data for Google.
- Tailwind
- React
- CSS
- WordPress