Design comparison
Solution retrospective
"Any advice to improve my code is always welcome."
Community feedback
- @EnverUstaPosted 10 months ago
Hi @ivanparraoda, congratulations for the solution. I have a few advice for you.
š You can improve your html semantic. Instead of using
div
directly inside of yourbody
, you can usemain
.š It seems like the usage of
header
specific to the card doesn't make sense in your context. Useheader
for the whole page if it's necessary not for your card. html-semanticš Comments like
/* Center horizontally */
doesn't make sense, your code already explains what it's doing. Using unnecessary comments reduce the readability.š
class="container"
is a generic name, instead use something likeprofile-card
.š Leverage the usage of classes not ids.
id="city"
š Don't use generic selectors like
h2
,p
. Maybe you can use something like.profile-card h2 {...}
. If you use them as generic when the project complexity increases, it will be hard to come up with a solution.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