Qr code components (HTML & CSS)

Please log in to post a comment
Log in with GitHubCommunity feedback
- @Hassiai
Replace <div class="img"> with the main tag, <h2> with <h1> and <h3 with <p> to fix the accessibility issues. click here for more on web-accessibility and semantic html
To center .img on the page using flexbox, add min-height:100vh and justify-content:center to the body.
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
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
- @Rabberpoli
Hi! Well done, you did a great job 😎
Below some advice just in case you would like to improve your code
- HTML :
Best practice is to use <main> tag to wrap all the main content of the page instead of the <div> . This can help you improving the accessibility of the page. The tag header ‘<h1>’ should be present even if you are not displaying it. You can create it and let it be hidden visually and, at the same time, readable by screen readers.
- Alt text:
The purpose of ‘alt’ text is to provide useful information about the meaning of the image. In this case the QR code will redirect the user to the frontendmentor.io site, so you could improve your attribute explaining what it does.
I hope these information could be useful as they were (and actually still are) to me! ☺️
Don’t stop creating great solution and seek for continuous improvement 😎
Happy coding!
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