Submitted 10 months ago
Faq accordian using HTML CSS and JavaScript
@HarshBehera
Design comparison
SolutionDesign
Solution retrospective
Feedbacks and suggestions regarding codes .. I found it difficult to write accordian code using js
Community feedback
- @AGutierrezRPosted 10 months ago
Hello there 👋. Good job on completing the challenge!
I have some suggestions about your code that might interest you.
General Structure and HTML:
- Wrap the primary content within the
<main>
tag instead of using it as a standalone component like a<div>
. - All the content should be contained within landmarks. Every page minimally needs a
<main>
element.
CSS and Styling:
- Implement CSS custom properties to define and utilize project colors more easily.
- Instead of fixed widths, employ
max-width
andmin-width
for flexible and responsive design. - Let the content decide the height of the elements. Use padding and margins strategically for this purpose.
Accessibility and Semantic HTML:
- Consider wrapping each
button
with ah2
. This is better for accessibility navigation because every accordion is a title. - Maintain semantic HTML structure by using appropriate elements for their intended purposes.
- Ensure compliance with accessibility standards by avoiding redundant or unnecessary tags and utilizing appropriate landmark elements.
I hope you find this helpful 😁. Most importantly, your submitted solution is fantastic!
Happy coding!
Marked as helpful1@HarshBeheraPosted 10 months ago@AGutierrezR Thank you so much for this detailed analysis. I will note this points.
0 - Wrap the primary content within the
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