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 HTML and CSS

Tboi 20

@Tboi250

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@justasteri

Posted

HTML:

  • Semantic elements: Consider using a more semantic element for the .image container. Since it holds an image, a <figure> element might be more appropriate.
  • Redundant srcset attribute: The img tag doesn't have a srcset defined, so you can remove the empty srcset="" attribute.

CSS:

  • Specificity: You can improve the specificity of your selectors to avoid potential conflicts with other styles. Consider using class names instead of tags whenever possible (e.g., .container instead of #container).
  • Responsiveness: The code currently uses fixed widths and margins. Implementing responsive design techniques like media queries would ensure the component adapts to different screen sizes.

Additional points:

  • Font loading: Importing the font from Google Fonts is a good practice. However, consider using a font-loading strategy (like font-display) to optimize performance.
  • QR code accessibility: For improved accessibility, consider adding a descriptive text block (besides the visual QR code) explaining its purpose and providing a link to the target website.
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