NFT Preview Card

Solution retrospective
Question 1: When should you use a div vs a section?
Question 2 How is my HTML Structure? How can it be improved?
Question 3: How is my CSS Positioning?
Thank you!😁
Please log in to post a comment
Log in with GitHubCommunity feedback
- @alphaura
Answer 1: Sections are mostly used when you have a specific sections (sounds cliché, but that's the fact haha). If you have a specific section, for example "about me", that can easily be turned into <section class="aboutme">, and the rest of the code of that section can be in a <div> unless it has its own semantic like <p>, <img>, etc... So for example "containers" are mostly done in a <div> tag like this <div class="container">.
Answer 2 & 3: Both structure and use are done good from what I can see. A nice thing to keep in mind is that when you are writing code, imagine that you are going to send it over to a senior and you want him/her to quickly understand what he is seeing, so adding some comments in both HTML & CSS of what that section of the code is for or doing would be an extra point
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