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 component using flexbox and custom properties

Jo_WithVisionā€¢ 90

@Jo-with-vision

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

Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

Hello @Jo-with-vision!

Your solution looks excellent!

I have just one suggestion:

  • Use only <main> to wrap the main content instead of <div>, <main> and <article>.

šŸ“Œ The tag <article> would make more sense if the card was part of a bigger website (in certainly would in real world), but here it is all we have on the screen.

Unless you used the three tags for a specific reason, there's no need to use all of them, considering that you can get the same result using only one. This helps you to reduce unnecessary code.

This tag change does not impact your project visually and makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.

I hope it helps!

Other than that, great job!

Marked as helpful

1

Jo_WithVisionā€¢ 90

@Jo-with-vision

Posted

Thank you so much @danielmrz-dev for reviewing my code!

Yes, you are right that I probably unnecessarily used two semantic sectioning tags - <main> and <article>. I wasn't sure if I should pretend the component was a part of a larger website within a<main> section to show that I understood what a good use for the article element would be, or if that was not necessary!

I see now that I could apply my card class to the <main> element, and remove the article, but I think I do still need my parent container/wrapper to center my card and the attribution on the page? Otherwise the attribution would inherit the card styling if it was inside the main and that was my only flexbox container?

I will certainly play around with your suggestions, to see what the results are , thank you!

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