Four Cards Feature Section Challenge - HTML, CSS, Responsive Layout
Design comparison
Solution retrospective
- When should I use <section> and <div>?
- What is the best practice while writing CSS classes name?
Community feedback
- @DavidMorgadePosted over 2 years ago
Hello and congratulations finishing the challenge!
To answer your questions, you usually use sections to divide parts of your site that are related, you use
divs
when the content you are putting together is not thematically related. In this project for example this full project could be an entiresection
that is thematically related content. You can havesections
outside yourmain
but they are normally used to divide yourmain
in different related parts that are still important and should go onmain
.For CSS classes there are a few conventions, I recommend you to learn the BEM methodology, its one of the best to organize your classes.
Hope my feedback helps you!
Marked as helpful1@teoh4770Posted over 2 years ago@DavidMorgade Thanks for the professional reply on the div and section difference. And I would definitely look into the BEM methodology you refer.
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