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 (Vanilla HTML&CSS)

Leon 30

@leonasdev

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.

HTML 📄:

  • Wrap the page's whole main content in the <main> tag.
  • 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 🎨:

  • It's generally not a good practice to use vh (viewport height) units for setting the font-size of text on a webpage. The vh unit is intended to size elements based on the height of the viewport, which can result in text that is too small or too large depending on the size of the viewport. This can make the text difficult to read, especially on small screens or in landscape orientation.

    Here is an image of how it would look on a mobile device (landscape orientation):screenshot-imgur 📸

    Instead, it's generally recommended to use rem (root em) or em units for setting the font-size of text.

  • Use min-height: 100vh instead of height: 100vh. The height property will not work if the content of the page grows beyond the height of the viewport.

I hope you find it useful! 😄 Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

1

Leon 30

@leonasdev

Posted

@MelvinAguilar

Really appreciate your feedback, especially the explanation about the vh unit and accessibility of the alt attribute.

I will improve these parts and continue to learn.

Your feedback is really helpful to me, thanks again.💕💕

1

@siniestr22

Posted

Greetings, I am new to Frontend Mentor and I would like to know how I can send the solutions that I am trying to find in the tutorials and I cannot find it

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