Design comparison
Solution retrospective
Feedback welcome
Community feedback
- @GregLyonsPosted over 2 years ago
Your solution matches the given design pretty well. I also see that you're using classes (rather than IDs) for styling, which is good for code reusability. Here are some suggestions I have based on your code:
-
Favor using semantic markup (e.g. <p> for text, <h1>, <h2>, etc. for headings) instead of <div>'s. For styling purposes, like the container for your card, it can be useful to use a <div>, but things like search engines and screen readers use the HTML tags to understand your page. So using semantic markup will make your website more accessible and have better SEO.
-
I'm not sure it's necessary to wrap your <img> in a <div>, as you should be able to apply "display: block" so that it acts like a block element (text doesn't wrap around it) instead. I believe this is what you intend, as I don't see any styling on your wrapper .QR-img <div>.
Marked as helpful0@abubakr404Posted over 2 years ago@GregLyons Thanks you very much for your interest and great advice.
1 -
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