Design comparison
Solution retrospective
Hello, please rate the project - Product preview card component.
I am a beginner.
I will be happy to receive tips on any mistakes I may have made in the code. So as not to develop bad habits.
Community feedback
- @dmuriPosted about 1 year ago
Hi there 👋
Really nice work, for the image swapping it is considered best practise to use picture and srcset tags. See an example below
<picture> <source media="(min-width: 800px)" srcset="large-image.jpg"> <img src="small-image.jpg" alt="Description of image"> </picture>
Here the "large.img will be used for screens wider than 800px and small will be displayed on screens under that.
Here is an article on the topic: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
Keep up the good work my friend!
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