Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Frontend Mentor | QR code component

KELVIN D TEACHβ€’ 120

@kelvin-0

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


are there any mistakes or any redundant stuff in my code?? if there are, what should I do instead? is there a best solution for this challenge?

Community feedback

Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHi @kelvin-0, congratulations on your first solution!πŸ‘‹ Welcome to the Frontend Mentor Coding Community!

Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:

1.Something I've noticed in your code is that on many occasions you've added some <div> to wrap contents that don't really need to be inside of a div block. Note that for this challenge all you need is a single block to hold all the content, which can be <div> or <main> if you want to use a semantic tag to wrap the content, the cleanest structure for this challenge is made by a block of content with div/main and all the content inside of it (img, h1 and p) without need of any other div or something. See the structure below:

<body>
<main>
<img src="./images/image-qr-code.png" alt="QR Code Frontend Mentor" >
 <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>
</main>
</body>

2.Use a CSS reset to avoid all the problems you can have with the default CSS setup, removing all margins, and making the images easier to work, see the article below where you can copy and paste this CSS code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/

✌️ I hope this helps you and happy coding!

Marked as helpful

1

KELVIN D TEACHβ€’ 120

@kelvin-0

Posted

@correlucas I appreciate you so much for even considering taking the time to review my code. I am looking forward to your next suggestions on my next challenge. love you lucas

0
Nelson Nzewiβ€’ 270

@nzewi

Posted

Congrats on completing your first challenge Kelvin

You have a great solution there

Here are my suggestions for you:

1.Use relative units like rem and em instead of px for spacing and font sizes, this would make your site more responsive. Learn about them and use them in your next project.

2.Never forget to add the alt attribute to your image tag. All images must have alternate text to convey their purpose and meaning to screen reader users. It makes your site more accessible.

3.In your #container styles, you do not need the width property since you have used max-width already.

4.Ensure that all content on your page is contained within a landmark region, e.g Wrapping your <div> without a class inside a <main> tag. This makes your HTML more semantic.

I hope this helps

Marked as helpful

1

KELVIN D TEACHβ€’ 120

@kelvin-0

Posted

@nzewi thanks a lot nelson for taking the time to review my code and provide some helpful tips, I will start implementing them as soon as I start my next challenge

0
Travolgi πŸ•β€’ 31,420

@denielden

Posted

Hi Kelvin, congratulations on completing the challenge, great job! 😁

Some little tips for optimizing your code:

  • add main tag and wrap the card for improve the Accessibility
  • also you can use article tag instead of a simple div to the container card for improve the Accessibility
  • img element must have an alt attribute, it's very important!
  • use min-height: 100vh instead of height, otherwise the content is cut off when the browser height is less than the content
  • instead of using px use relative units of measurement like rem -> read here

Hope this help! Happy coding πŸ˜‰

Marked as helpful

1

KELVIN D TEACHβ€’ 120

@kelvin-0

Posted

@denielden thank you so much deniel for spending the time reviewing my code and giving some helpful tips, I will start applying it as soon as I start the next challenge.

1
Travolgi πŸ•β€’ 31,420

@denielden

Posted

@kelvin-0 You are welcome and keep it up :)

1

Please log in to post a comment

Log in with GitHub
Discord logo

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