Design comparison
Community feedback
- @danielemanca1983Posted almost 2 years ago
Hi Gaurav,
Nice solution to the coding challenge, however I'd like to provide you with a suggestion for future reference, to make the code even better.
For instance you have an .image-container class in your mark-up, which you target in the CSS and assign an image to through the background-image property, in this case, I think the best would be to have a picture tag in the mark-up and use the srcset attribute where you can have multiple instances of the image, which makes it also accessible to screen readers, as using background-image is not accessible at all by screen-readers.
Here is an example of how to use the picture tag in HTML: picture
Other than that it's a really good solution, :)
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