Design comparison
Solution retrospective
If the code is clear and easy to read, if the HTML is structured semantically, if the CSS stylesheet is well-organized, and if there is a more efficient way to accomplish a specific task.
Community feedback
- @StroudyPosted about 2 months ago
Exceptional work! You’re showing great skill here. I’ve got a couple of minor suggestions that could make this stand out even more…
-
Using a
<main>
tag inside the<body>
of your HTML is a best practice because it clearly identifies the main content of your page. This helps with accessibility and improves how search engines understand your content. -
You have a article and a div doing the same job, You can remove the div as is has no semantic meaning.
<div class="card-container"> <article class="card"> <img src="./images/image-qr-code.png" alt="QR code leading to Frontend Mentor website"> <section class="card-content"> <h2>Improve your front-end skills by building projects</h2> <p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p> </section> </article> </div>
-
Using a full modern CSS reset is beneficial because it removes default browser styling, creating a consistent starting point for your design across all browsers. It helps avoid unexpected layout issues and makes your styles more predictable, ensuring a uniform appearance on different devices and platforms, check out this site for a Full modern reset
-
Line height is usually unitless to scale proportionally with the font size, keeping text readable across different devices. Best practice is to use a unitless value like
1.5
for flexibility. Avoid using fixed units likepx
or%
, as they don't adapt well to changes in font size or layout. -
While
px
is useful for precise, fixed sizing, such asborder-width
,border-radius
,inline-padding
, and<img>
sizes, it has limitations. Pixels don't scale well with user settings or adapt to different devices, which can negatively impact accessibility and responsiveness. For example, usingpx
for font sizes can make text harder to read on some screens, Check this article why font-size must NEVER be in pixels. In contrast, relative units likerem
and adjust based on the user’s preferences and device settings, making your design more flexible and accessible. Usepx
where exact sizing is needed, but prefer relative units for scalable layouts. If you want a deeper explanation watch this video by Kevin Powell CSS em and rem explained. Another great resource I found useful is this px to rem converter based on the default font-size of 16 pixel.
I hope you’re finding this guidance useful! Keep refining your skills and tackling new challenges with confidence. You’re making great progress—stay motivated and keep coding with enthusiasm! 💻
1 -
- @vighgivPosted about 2 months ago
Using the
px
unit forfont-size
is not recommended because it is not accessible. When users adjust their browser’s default font size, the text on your site will remain fixed at thepx
value you set. Userem
instead ofpx
.For more details, you can check out this blog post.
Personally, I recommend a helpful VS Code extension called px to rem & rpx & vw (cssrem) to effortlessly convert between these units.
Hope this helps!
1 - @henrivilarPosted about 2 months ago
The code is pretty clean, semantic HTML, readable CSS e the result is great. Congratz!
1
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