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

mobile first qr code component

Jayaditya 10

@jay6909

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

@0xabdulkhaliq

Posted

Hello there 👋. Congratulations on successfully completing the challenge! 🎉

  • I have other recommendations regarding your code that I believe will be of great interest to you.

QR iMAGE ALT TEXT 📸:

  • Since this component involves scanning the QR code, the image is not a decoration, so it must have an alt attribute.
  • The alt attribute should explain the purpose of the image.
  • E.g. alt="QR code to frontendmentor.io"
<img src="/images/image-qr-code.png" alt="QR code to frontendmentor.io">

.

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

0
Hassia Issah 50,690

@Hassiai

Posted

Replace <div class="main-container"> with the main tag and <h3> with <h1> to make the content/page accessible. click here for more on web-accessibility and semantic html

Every html must have <h1> to make it accessible. Always begin the heading of the html with <h1> tag wrap the sub-heading of <h1> in <h2> tag, wrap the sub-heading of <h2> in <h3> this continues until <h6>, never skip a level of a heading.

There is no need to style .main-container, give the body a background-color of light-ray. Use the colors that were given in the styleguide.md found in the zip folder you downloaded.

For a responsive content which wont require a media query for this challenge, there is no need to give #qr-holder a max-height rather increase max-width value and the padding value for all the sides, max-width: 320px which is 20rem/em padding:16px which is 1rem/em, and give the img a max-width of 100% instead of a fixed value.

Replace the width and height values in .text-holder with a margin value for all the sides and reduce the font-size of h1.

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here and here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

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