Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

full Responsive with HTML and CSS. (Product preview card component)

@Hamza0053

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Please leave any advice or appriciation related to my work. All feedback is appreciated.

Community feedback

Daniel 🛸 44,250

@danielmrz-dev

Posted

Hello @Hamza0053!

Your solution looks great!

I have a couple of suggestions for improvement:

  • For semantic reasons, only use one <h1> per page - this should represent the main heading/subject for the whole page.

The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. <h6> defines the least important heading. And don't skip heading levels - start with <h1>, then use <h2>, and so on.

  • Also, still about semantic HTML, you can replace your div.wrapper with main.wrapper.

All these tag changes may have little or no visual impact but they make your HTML code more semantic and improve SEO optimization as well as the accessibility of your project.

I hope it helps!

Other than that, great job!

Marked as helpful

0

@Hamza0053

Posted

@danielmrz-dev Thanks sir for your suggestion

1

@0xabdulkhaliq

Posted

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.

PiCTURE TAG 📸:

  • Looks like you're currently using media queries for swapping different version of image, 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>
  <source media="(max-width: 768px)" srcset="small-image.jpg">
  <source media="(min-width: 769px)" srcset="large-image.jpg">
  <img src="fallback-image.jpg" alt="Example image">
</picture>
  • In this example, the <picture> tag contains three child elements: two <source> elements 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 always check out my submission and/or feel free to reach out to me.

.

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

0

@Hamza0053

Posted

@0xAbdulKhalid Bro thanks for your kind attention. As you see I am beginner in this field and I am struggling to improve my skill. This is first time I am submitt my solution that I have done in last two days. Its grateful for me to talk an expert like you.

0

@0xabdulkhaliq

Posted

Jazakhallahu Khairan Brother @Hamza0053,

0

@Hamza0053

Posted

@0xAbdulKhalid I am tried to use picture tag but it not working in edge and chrome but work well in firefox why this happen

0

@Blackpachamame

Posted

Greetings mate! I see that you have done a great job, I can mention some details to improve your solution:

  • You can add a short description to your image with the alt attribute, this helps the accessibility of the site. More info
  • You can also review this documentation on the label <picture>

Marked as helpful

0

@Hamza0053

Posted

@Blackpachamame thanks for your review It really helpfull to me

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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