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

Michael Ojjiβ€’ 10

@sagehands101

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


Please what did you find difficult in this challenge?

took me awhile fiddling with font sizes, widths and box margins

Community feedback

@MelvinAguilar

Posted

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

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

HTML πŸ“„:

  • The text Improve Your Front-End Skills by Building Projects is considered a heading element.
  • Use semantic elements such as <main> to improve accessibility and organization of your page.

Alt text πŸ“·:

  • 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 🎨:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. You can read more about this here πŸ“˜.
  • To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here πŸ“˜.
body {
    background-color: hsl(212, 45%, 89%);
    font-family: "Outfit", sans-serif;
    text-align: center;
    min-height: 100vh;
    display: grid;
    place-content: center;
}

.main {
    /* margin: 100px auto; */
}
  • You should use a CSS reset. A CSS reset is a set of CSS rules that are applied to a webpage in order to remove the default styling of different browsers

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

Happy coding!

Marked as helpful

1

Michael Ojjiβ€’ 10

@sagehands101

Posted

@MelvinAguilar thanks a lot

I'm 2weeks into my coding journey as a beginner, this really helped and I'll work on those points

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