
Design comparison
Community feedback
- P@RahexxPosted 3 months ago
Code Review Feedback
Great job with this challenge! Below is my detailed feedback on your work:
HTML
- The structure is good, but consider simplifying your BEM naming convention. For example:
- Instead of using
accordion__container
andaccordion
, you could simply useaccordion
,accordion__btn
, andaccordion__icon
. - Similarly, for the FAQ section, using a modifier like
faq--last
is better thanfaq__last
, as it aligns more closely with BEM principles.
- Instead of using
- Ensure that
alt
attributes for icons are meaningful. Emptyalt
attributes may cause accessibility issues, as screen readers won’t convey any information about the images.
CSS
- Your styles are clean and well-structured. However, to address the issue with spacing between the image and the screen edge on wider screens, you can use properties that allow better scaling and responsiveness like
background-size: cover
JavaScript
- Your JavaScript is clean and readable—great job! However, there’s a UX issue:
- The functionality for expanding/hiding accordion information is not applied to the button icon. Many users will intuitively try to click the icon, so it’s essential to make it interactive.
- Instead of directly modifying styles in JavaScript, I suggest:
- Create a CSS class for an "open" accordion state.
- Use JavaScript to add, remove, or toggle this class. This approach is scalable and simplifies handling more complex scenarios in the future.
General Advice
Here are a few suggestions for you:
- Consider learning SASS (CSS preprocessor). It’s a quick skill to pick up and will make your CSS more manageable and modular in future projects. Learning SASS now will also serve as a solid foundation as you transition into more advanced JavaScript development.
- Focus on JavaScript basics before making another HTML, CSS and JS challange. This way, you’ll build a strong foundation without overwhelming yourself.
Recommended Resources
Here are some excellent resources to continue learning JavaScript:
- JavaScript.info
- FreeCodeCamp JavaScript Course
- SuperSimpleDev - YouTube Course
(A comprehensive, beginner-friendly video tutorial.) - MDN Web Docs - JavaScript (Official documentation.)
Tips for Learning
- Always complete exercises in tutorials, even if you think you know the answer. Hands-on practice is critical for mastering JavaScript.
- Apply what you’ve learned by building small projects. Practical experience is the best way to solidify your knowledge.
Final Thoughts
- Keep up the great work! I recommend completing another challenge using just HTML and CSS while continuing to learn JavaScript at your own pace. Once you’re comfortable with the basics, start incorporating JavaScript into your projects.
- Regarding your previous question about the challenge, I’ll share my contact information on GitHub.
Well done, and good luck with your next project!
Marked as helpful0@jhenniiferPosted 3 months ago@Rahexx Thank you very much. I will start learning Sass today
0 - The structure is good, but consider simplifying your BEM naming convention. For example:
- @AkshobyaRaoSWEPosted 3 months ago
Hi @jhenniifer, Nice Job! After taking a look at it, I realized that the JS might not have been added to the code(which was a main part of the project statement). From what I see, you're doing well with CSS and HTML, so, if you haven't already, you might want to start thinking about learning vanilla js. Additionally, the background image doesn't cover the full viewport width, which can be fixed by adding background-size:cover. Overall, nice job! Happy Coding!
Marked as helpful0@jhenniiferPosted 3 months ago@2WeekOfGrind thank you. I am in the process of getting a hang of js. If you could recommend materials or tutorials, I'd really appreciate
0
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