Hi Amina, You've asked two very different questions there. I'll take the first one. Moodle's default themes are based on the Bootstrap framework. Bootstrap has a "Collapse" component which supports an accordian style, you can see the documentation here: https://getbootstrap.com/docs/4.5/components/collapse/#accordion-example
In general, if you have tried to do something and it hasn't worked, it's helpful if you share the code you tried (with a link to GitHub or similar) so that people can see where you might have gone wrong.