Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Your session has expired please log in again.
Your session has expired please log in again.
Your session has expired please log in again.
Your session has expired please log in again.
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

css grid and flexbox

Sachinβ€’ 830

@Sachin-Mahato

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

@MelvinAguilar

Posted

Hello there πŸ‘‹. Good job on completing the challenge !

I have some suggestions about your code that might interest you.

  • Figure elements (<figure>) should only be used when captions are required with <figcaption>, you can directly use the div tag in this solution.

Alt text πŸ“·:

  • The alt attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
  • The alt attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a better alt attribute would be QR code to frontendmentor.io

    If you want to learn more about the alt attribute, you can read this article. πŸ“˜.

CSS 🎨:

  • To fix the text, you should remove the flex-wrap: wrap; on the .container selector.
  • Setting the font-size to 62.5% can attract compatibility issues with third-party libraries or plugins. You can read more about this with this two lectures:
  1. The Surprising Truth About Pixels and Accessibility - The 62.5% trick
  2. A comment on the 62.5% trick

Credit to grace-snow and vanzasetia for pointing this out.

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

0

Sachinβ€’ 830

@Sachin-Mahato

Posted

@MelvinAguilar I don't know how to give a good class name, can you help how to come up with a good class name?

0

@MelvinAguilar

Posted

@Sachin0000000 Hi! I suggest you to learn the BEM naming convention. The BEM (Block, Element, Modifier) naming convention is a methodology for naming HTML classes used in web development. It is a way of breaking down the structure of a website into smaller, reusable parts. The BEM naming convention uses three levels of specificity: Block, Element and Modifier. Blocks are the highest level of specificity and represent the root of a component. The syntax for BEM class names follows this pattern: block__element--modifier.

e.g:

<div class="card">
  <img src="image.jpg"  class="card__image"/>
  <div class="card__text">...</div>
</div>

Marked as helpful

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