Responsive product preview card using CSS Flexbox
Design comparison
Solution retrospective
Hello, frontend community! π
I hope you're doing code tooπ. I've just completed this challenge and would love to get your valuable feedback. Your insights will be incredibly helpful for my learning journey. Below are a few questions I have:
π How does the project perform on different devices? Any recommendations for better responsiveness?
π How is the organization of my code? Any suggestions for improving code readability or maintainability?
π What are your general impressions of the project? Are there any standout positives or areas that need improvement?
Thanks a lot πfor taking the time to review! I truly appreciate your feedback and look forward to learning from your perspectives. Feel free to drop your comments or suggestions below.
Community feedback
- @rayaattaPosted 10 months ago
Hello there π. Congratulations on successfully completing the challenge! π
I have other recommendations regarding your code that I believe will be of great interest to you.
1 Text should not be wrapped inside sectioning element rather the parent shouls be given a child element for text such as span,p,h2 etc Wrap the text inside your footer inside a
p
2The PiCTURE TAG πΈ:
Looks like you're currently using media queries for swapping different version of image by setting up their display property in CSS, So let me introduce the picture element. The
<picture>
tag is commonly used for responsive images, where different image sources are provided for different screen sizes and devices, and for art direction, where different images are used for different contexts or layouts. Example:<picture class="image-container"> <source srcset="images/image-product-desktop.jpg" media="(min-width: 600px)"> <img src="images/image-product-desktop.jpg" alt="a picture showing a bottle of perfume"> </picture>
In this example, the
<picture>
tag contains two child elements: one<source>
element and an <img> element. The<source>
elements specifies different image sources and the conditions under which they should be used. Using this approach allows you to provide different images for different screen sizes without relying on CSS, and it also helps to improve page load times by reducing the size of the images that are served to the user If you have any questions or need further clarification, you can check out this articleI hope this helps π and also nice work
Happy coding!π
1 - @danielmrz-devPosted 10 months ago
Hello @shubham-cj!
Your solution looks excelent!
I have just one suggestion:
- For semantic reasons, don't skip heading levels - start with
<h1>
, then use<h2>
, and so on. Unlike what most people think, it's not just about the size and weight of the text.
The
<h1>
to<h6>
tags are used to define HTML headings.<h1>
defines the most important heading.<h6>
defines the least important heading. Only use one<h1>
per page - this should represent the main heading/subject for the whole page.This change has little or not effect at all on the project, but it makes your HTML code more semantic, improving SEO optimization as well as the accessibility of your project.
I hope it helps!
Other than that, you did a great job!
0 - For semantic reasons, don't skip heading levels - start with
- @Naveen-CBPosted 10 months ago
Hello Shubham, I have few suggestion to improve your code. Here it is: 1. use font-face or link the font URL instead of importing in your CSS it increases web performance and font accessibility import or font-face can be helpful when you using multiple fonts for styling. 2. Try to use source tag in html to use different images in same position. 3. Also mentioning fonts in rem or em is the good practice to increase your font visibility to different screens.
I hope is might be helpful!
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