Design comparison
Solution retrospective
Extra HTML/CSS practice. Any comments/feedback is appreciated. Thanks!
Community feedback
- @VCaramesPosted about 2 years ago
Hey @bh-codes
Excellent use of the Main Element to identify your main content and the Article Element to wrap your content. Not many get this correct.
- The Picture Element is being used incorrectly and is not needed for this challenge.
More Info:
https://www.w3schools.com/html/html_images_picture.asp
-
The Alt Tag description for the QR image needs to be improved upon. Its needs to tell screen reader users what it is and where it will take them to when they scan it.
-
Change the
width
of the .card-container tomax-width
to make it responsive and addpadding
to the card. -
For the image, change the
width
to 100% (don't restrict your images) and remove themargin
not needed.
Happy Coding! 👻🎃
Marked as helpful0@bh-codesPosted about 2 years ago@vcarames Thank you for the tips! They are extremely helpful! 👏
0 - @correlucasPosted about 2 years ago
👾Hello @bh-codes, Congratulations on completing this challenge!
Great code and great solution! I’ve few suggestions for you that you can consider adding to your code:
Your solution is great and the code is working, but the HTML structure can be reduced by removing unnecessary divs, all you need is a single
<main>
or<div>
to keep all the content inside, and nothing more. The ideal structure is thediv
and only the image, heading, and paragraph.Here’s one example to show can be cleaner this HTML structure:
<body> <main> <img src="./images/image-qr-code.png" alt="QR Code Frontend Mentor" > <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>
To reduce the CSS you can use the direct selector for each element instead of using
class
this way you have a code even cleaner, for example, you can select everything using the direct selector for (img, h1, and p, main).✌️ I hope this helps you and happy coding!
0
Please log in to post a comment
Log in with GitHubJoin 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