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

ggitaunโ€ข 50

@ggitaun

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


Feedback welcome. I have especially had trouble with matching my screenshot to the expected solution. Advice on how to fix this would be appreciated.

Community feedback

@MelvinAguilar

Posted

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

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

  • Without the Figma design, estimating sizes can be challenging. I recommend using a browser extension like "Pixel Perfect" to help you more accurately estimate sizes.

Alt text ๐Ÿ“ท:

  • To make the alt attribute as useful and effective as possible, avoid using words such as "image", "photo", or "picture" as they are redundant because the image tag already conveys that information. Instead, try to make the description as human-readable and understandable as possible.

    The alt attribute should explain the purpose of the image, for example, in the case of a QR code, a description like "qr code to frontendmentor.io" would be more appropriate.

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

CSS ๐ŸŽจ:

  • You don't need to add font-family: "Outfit", sans-serif; to each <p>, <h*> separately. Instead, add it to body.
  • To center the component in the page, you should use 100vh instead of 100% and remove the margin:
body {
    background-color: hsl(212, 45%, 89%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.box {
    /* [...] */
    /* margin-left: auto; */
    /* margin-right: auto; */
    /* margin-top: 80px; */
}

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

Happy coding!

Marked as helpful

0
rayaโ€ข 2,870

@rayaatta

Posted

Hello ggitaun๐Ÿ‘‹ congratulations on completing this challenge ๐ŸŽ‰

I have some tips that you might find useful. Try to make your html more Semantic by wrapping the main page content inside a <main> tag . Replace <div class="box"> With <main class="box">. This changes nothing visually but Using it makes all the difference. Using semantic markup improves

SEO

And user experience for people using assistive technology such as screen readers. In order to make your HTML code more semantic, wrap the main title with <h1> instead of just h3 Here's a quick guide on how to use them:

The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. <h6> defines the least important heading. Only use one <h1> per page - this should represent the main heading/subject for the whole page. Also, do not skip heading levels - start with <h1>, then use <h2>, and so on. You can then style them in you css. Unlike popular belief.

Unlike what most people think, it's not just about the size and weight of the text

I hope this helps.

Your solution is nice๐Ÿ‘

Happy coding ๐Ÿ™ƒ

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