Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
Overall, I learned to use new tags () in HTML for creating collapsible sections. Additionally, I explored how to incorporate JavaScript to toggle classes and enable keyboard navigation through properties.
document.querySelectorAll(".faq_heading").forEach((heading) => { heading.addEventListener("click", () => { const faqItem = heading.parentElement; faqItem.classList.toggle("active"); }); });
:focus-visible {
outline: 0.1875rem dotted #9b59b6;
outline-offset: 0.125rem;
}
What challenges did you encounter, and how did you overcome them?
Following the model was a bit tricky. The unique way to achieve the same result was by using in HTML to create collapsible sections.
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord