Design comparison
SolutionDesign
Solution retrospective
The challenge wasn't difficult for me, but it was quite good for practicing the "basics".
But i´m unsure about this html structure:
<div class="qrcode-container ">
<img src="images/image-qr-code.png" alt="A QR-Code to frontendmentor.io">`
</div>
Is that the "best practice", wraping a div-container arround an image or should i do it without the surrounding container?
Community feedback
- @fernandolapazPosted over 1 year ago
Hi 👋, regarding your question:
No need to wrap the image with a <div>, in my opinion.
<div>
is a non-semantic element, tells nothing about its content, and it doesn't seem to serve any function in this case.I would say that, when in doubt, ask yourself if it can be removed without impact.
I hope it’s useful 🙂
Regards,
Marked as helpful1
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