QR code component using Tailwind CSS

Please log in to post a comment
Log in with GitHubCommunity feedback
- @denielden
Hi Kiandra, congratulations on completing the challenge, great job! 😁
Some little tips for optimizing your code:
- use
main
tag to wrap the card and improve the Accessibility - use
article or div
tag instead of a simplediv
to the container card for improve the Accessibility - use
img
element for the qr image instead of a styleddiv
- use
min-height: 100vh
to body instead ofheight
, otherwise the content is cut off when the browser height is less than the content
Hope this help! Happy coding 😉
Marked as helpful - use
- @correlucas
👾Hello Kiandra Ginevra, Congratulations on completing this challenge!
Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:
1.It is not advisable to use IDs as CSS selectors because if another element in the page uses the same/similar style, you would have to write the same CSS again. Even if you don't have more than one element with that style right now, it might come later.
2.Something I've noticed in your code is that in many occasions you've added some
<div>
to wrap contents that don't really need to be inside of a div block. Note that for this challenge all you need is a single block to hold all the content, can be<div>
or<main>
if you want to use a semantic tag to wrap the content, the cleanest structure for this challenge is made by a block of content with div/main and all the content inside of it (img, h1 and p) without need of any other div or something. See the structure below:<body> <main> <img src="./images/image-qr-code.png" alt="Qr Code Image" > <h1>Improve your front-end skills by building projects</h1> <p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p> </main> </body>
✌️ I hope this helps you and 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