Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive FAQ Accordion page using JavaScript

@MusaddiqueAli

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What challenges did you encounter, and how did you overcome them?

One small challenge or hurdle that I encountered was to make the JS script work, as I am yet to learn and master DOM manipulation, and so I realized that having the script tag within the head tag doesn't always work as the browser tries to load and execute the JavaScript code before it has fully parsed and constructed the DOM, but we can solve this by using the 'defer' attribute within the script tag. This attribute tells the browser to download the script while parsing the HTML but to only execute it after the entire document has been parsed.

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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