Develop With Faith
September 13, 2026

The HTML Attribute That Turns Your Church FAQ Into a Clean Accordion (No JavaScript)

Open the FAQ page on most church websites and you can watch the layout jump around as you tap. One question opens, then a second, then a third — and by the time you're looking for the answer about children's ministry, four other panels are pushing it off the screen. The "only one open at a time" behavior most sites want has, until recently, cost a small JavaScript file and a few event listeners.

A single HTML attribute now handles it natively.

Give a group of <details> elements the same name attribute, and the browser treats them as a set — opening one automatically closes the others. That is the whole feature.

<details name="visit-faq">
  <summary>What time does the service start?</summary>
  <p>Sundays at 9 and 11 a.m.</p>
</details>

<details name="visit-faq">
  <summary>Is there something for my kids?</summary>
  <p>Yes — nursery through 5th grade during both services.</p>
</details>

<details name="visit-faq">
  <summary>What should I wear?</summary>
  <p>Whatever you'd wear to brunch. Jeans are fine.</p>
</details>

Any <details> sharing the same name becomes part of an exclusive group. Different groups on the same page — a Plan Your Visit FAQ and a Giving FAQ, for example — each get their own name and stay independent of each other.

It reached Baseline in every major browser last year, and the fallback is the friendliest kind: on any older browser, the group simply behaves like ordinary <details> — multiple panels can open, nothing breaks, nothing throws.

A few small things this quietly unlocks on a church site:

  • FAQ pages stop scrolling themselves into confusion.
  • Staff and ministry directories, where each bio is a <details>, keep the list scannable.
  • Sermon series descriptions on a message archive stay compact when someone is browsing.

The point is not the attribute. It is that a first-time guest looking for the answer to one question shouldn't have to fight the page to find it.

If your church website's FAQ, staff, or ministry pages have quietly grown into a wall of open panels, we can help clean them up — usually in less time than it takes to explain the problem.

← Back to all posts