Skip to content

FAQ with Category Tabs

Bootstrap 5 FAQ section where category pills switch between separate accordion sets, with question counts and a support card.

Also known as: faq with categories, tabbed faq, faq accordion by topic, categorized faq section

FAQ with Category Tabs live demo

Open in new tab

Bootstrap 5 code (HTML, CSS)

A Bootstrap 5 FAQ section that groups questions by topic: category pills on the left switch between separate accordion sets on the right. It suits help centers, pricing pages and product landing pages where one long list of questions would be hard to scan. It needs no custom JavaScript, because Bootstrap's tab and collapse plugins do all the work.

How it works

The root section.fqt-faq uses a Bootstrap grid. The left column (col-lg-4) holds the heading, an intro line, the .fqt-pills tab list and a dark .fqt-contact card. Each .fqt-pill is a nav-link button with data-bs-toggle="pill" and a data-bs-target that points to a .tab-pane. Pills show an icon, the label and a .fqt-pill-count badge with the number of questions.

The right column contains .tab-content.fqt-content with one tab-pane per category (#fqt-pane-general, #fqt-pane-billing, #fqt-pane-account, #fqt-pane-shipping). Every pane wraps its own .accordion.fqt-accordion, and each .fqt-item uses data-bs-parent with that pane's accordion id, so only one answer per category is open at a time. The first question of every category starts expanded.

On phones the pills sit in a horizontally scrollable row; from the lg breakpoint flex-lg-column stacks them vertically as a sidebar and the support card appears. The accordion is restyled through Bootstrap's own --bs-accordion-* variables into separate rounded cards with an accent bar on the open question.

Customization

  • --fqt-accent and --fqt-accent-soft on .fqt-faq in style.css: change the teal used by the active pill, count badges and open question.
  • --fqt-bg and --fqt-card: set the section background and the card color of pills and questions.
  • --fqt-radius: make the question cards and the support card more or less rounded.
  • col-lg-4 and col-lg-8: change the column split, for example col-lg-3 and col-lg-9 for a narrower sidebar.
  • Remove data-bs-parent from the .accordion-collapse elements of a pane to let several answers stay open at once.
  • Add a category by copying one .fqt-pill and one .tab-pane, then giving both new matching ids.

Use cases

  • Help centers: category pills switch between separate accordion sets for general, billing, account and shipping
  • Pricing pages: visitors jump to billing questions without scanning one long list
  • Product landing pages: a support card beside the questions points people to contact when answers are missing
  • Online stores: pills show question counts so customers can see how much each topic covers

Accessibility

The pill container has role="tablist" with an aria-label; each pill has role="tab", aria-controls and aria-selected, and each pane has role="tabpanel" with aria-labelledby. Bootstrap moves focus between tabs with the arrow keys and keeps only the active tab in the tab order. Accordion buttons expose aria-expanded and aria-controls. Questions use h3 headings under the section h2, focus rings use a high-contrast amber :focus-visible outline, and transitions are turned off with prefers-reduced-motion.

Usage notes

Requires the Bootstrap 5.3 bundle and Bootstrap Icons. Ids must be unique, so prefix them differently when you place two FAQ sections on the same page.

FAQ with Category Tabs at a glance

Framework
Bootstrap 5
Code
HTML, CSS
JavaScript
Only Bootstrap 5's own script
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
FAQ Sections
License
Free for personal and commercial use

Questions about this template

Can I use the FAQ with Category Tabs code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Bootstrap 5's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
FAQ with Category Tabs – free Bootstrap 5 faq section template
FAQ with Category Tabs · free Bootstrap 5 faq section template

More FAQ Sections

Two-Column FAQ – free Bootstrap 5 faq section template

Two-Column FAQ

Bootstrap 5 FAQ section with questions split into two accordion columns, plus/minus icons and a dark contact support prompt.

FAQ Accordion with Details Blocks – free WordPress faq section template

FAQ Accordion with Details Blocks

An FAQ accordion with six expandable questions next to a heading and contact button, a frequently asked questions section built from Gutenberg Details blocks.

FAQ Accordion Section for Shopify – free Shopify faq section template

FAQ Accordion Section for Shopify

Shopify FAQ section with a native details accordion, an intro column with contact button, and optional FAQPage structured data.

FAQ with Live Search Filter – free Tailwind CSS faq section template

FAQ with Live Search Filter

Tailwind CSS FAQ section with a live search box that filters questions as you type, highlights matches, adds topic chips and shows an empty state.

FAQ Accordion Section – free Tailwind CSS faq section template

FAQ Accordion Section

Dark Tailwind CSS FAQ section with an accessible accordion, smooth expand animation, keyboard navigation and a support contact card.