Design comparison
Solution retrospective
Any feedback will be much appreciated :)
Community feedback
- @Will-1-AmPosted over 3 years ago
Hey Rhona, nice work on submitting your challenge project.
You might consider different elements for the h2 tags you use for the numbers in the stats section of the card since they don't really make sense as headings - although I can see how one would reach for h2 as I chose it myself initially 😅.
You make use of a lot of div elements in your html and it might be useful to replace some of them with more suitable elements (e.g. the challenge is to produce a component that is reusable, possibly in other projects - check out this link which helped me (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article).
I hope this helps you along in your coding journey.
1@rhonallPosted over 3 years ago@Will-1-Am Thank you so much for your feedback :) True, the numbers in the stats section are not really a heading. I have a habit to put heading tags on the bigger size words (not good), now I really need to think about the meaning behind it first.
I'm always confused when should I use <section>, when should I use <article>. Thanks for sharing the links. In this case should I use <section> for the stats column as they are kind of re-use within the profile card?
0@Will-1-AmPosted over 3 years ago@rhonall If you are confused when you should use a heading element, just think whether the parent heading has logical child text - e.g. a chapter title in a book and the actual chapter text.
If you are confused about when to use div elements, it would seem like good practice to use elements that make sense initially and then refactor as necessary. Use div elements unless you know, or learn of something more suitable that will help you and other developers understand your code at a later date. Hopefully, that helps explain things somewhat. Happy coding! 🙂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