Problem Statement
Which data attribute toggles a collapsible element in Bootstrap 5?
Explanation
In Bootstrap 5, use the attribute data-bs-toggle set to 'collapse' on the trigger element. Combine it with data-bs-target to link to the collapsible content you want to show or hide.
Code Solution
SolutionRead Only
<button class='btn btn-primary' data-bs-toggle='collapse' data-bs-target='#faq1'>Toggle</button> <div id='faq1' class='collapse'>Answer text</div>
