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

QR code component solution

Gurvβ€’ 160

@gsparmar

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


I struggled mostly with the CSS.

Community feedback

Travolgi πŸ•β€’ 31,420

@denielden

Posted

Hi Gurv, 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
  • add descriptive text in the alt attribute of the images
  • remove all margin from .container class because with flex they are superfluous
  • use justify-content: center to the body to center the card horizontally
  • instead of using px use relative units of measurement like rem -> read here

Hope this help! Happy coding πŸ˜‰

Marked as helpful

0
Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHi @gsparmar, 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:

Replace the <h3> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.

Add the alt text to improve accessibility.The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of a slow connection, an error in the src attribute, or if the user uses a screen reader). ---> <img src="./images/image-qr-code.png" alt="QR Code Frontend Mentor">

Use <main> instead of a simple <div> this way you improve the semantics and accessibility showing which is the main block of content on this page. Remember that every page should have a <main> block and that <div> doesn't have any semantic meaning.

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/

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR

✌️ I hope this helps you and happy coding!

0
Nelson Nzewiβ€’ 270

@nzewi

Posted

Congrats on completing this challenge Gurv

You did great on this challenge. Your CSS is very good.

Here are my suggestions:

1.Using relative units like rem and em instead of px for your spacing and font-size would make your site more responsive. Learn about them and use them in your next project.

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

3.Pay close attention to the design and put more effort into trying to replicate it. You can make the font-size of your card heading larger.

I hope this helps

0

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