@Stroudy
Posted
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. -
Overusing
<div>
tags, known as "divitis," leads to cluttered code, poor semantics, and reduced performance. Instead, use appropriate semantic elements (like<header>
,<section>
, etc.) to improve readability, accessibility, and SEO. Keep HTML clean and minimal to ensure maintainability, scalability, and better CSS structure.
<div class="card">
<div class="image">
<img src="images/image-qr-code.png" alt="Qr code">
</div>
<div class="text">
<h1>Improve your front-end skills by building projects</h1>
<p> Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
</div>
</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
-
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. -
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.
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! 💻
Marked as helpful
@stephany247
Posted
@Stroudy, Thank you so much for the thoughtful and detailed feedback. I really appreciate the time you took to review my code and suggest improvements.
I especially loved that you linked helpful resources, it’s great to have those to dive deeper into topics like semantic HTML, CSS resets, and using relative units like rem and em for better scalability. I’ll definitely be checking out the video from Kevin Powell and the px to rem converter you mentioned!
Your suggestion on using a <main> tag and reducing “divitis” makes a lot of sense, and I’m already seeing how incorporating more semantic elements can improve the structure of my code. I’ll also start implementing a modern CSS reset to avoid those pesky browser defaults.
Thanks again for all the advice and encouragement, it’s feedback like this that really motivates me to keep improving. Looking forward to applying your tips and refining my skills even more! 💻🚀
@Stroudy
Posted
Hey @stephany247, What a lovely and thoughtful response, Thank you for letting me know it was helpful, I am happy you are onboarding this feedback, If I could give you a tip, Review other people's code where you have completed the challenge, Compare your code to there and give feedback, This is apart of the learning journey, It will help you loads.