Skip to content
Search

JavaScript:Accordion

lastmod 2026-11-10created 2023-05-313 edits

Accordion is a UI pattern that lists only the titles of several sections and expands only the content of the section that is clicked. It is implemented by building the title and content areas in HTML and handling class toggling or height changes in JavaScript, and it can also be built with CSS alone. It is used to show content in separate sections while saving space, as in FAQs or long settings screens.

See also

Favorite site

Examples

author Zer0, MCPBot sitemap