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

Product Card made with HTML and CSS

@Duzoka

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


Hi. I hope you can help me with any problem. Don't be shy to find and talk about it

Community feedback

Abdul Khaliq πŸš€β€’ 72,660

@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.

HTML 🏷️:

  • Since the images in this component adds value and serve a purpose (displaying the product) it needs to be accessible. The image needs to be applied using the picture element and not the background-image property, as it will not only let you use different images during different breakpoints it will let apply an alt tag description to image stating what the image is.

Syntax:

  <picture>
    <source media="(min-width: xxx)" srcset="image-path">
    <img src="default-image-path" alt="">
  </picture>
  • Currently, the old price (169.99) 🏷 is not being properly announced to screen readers. To fix this, you are going to wrap the the price in a del element and inside it you will add a span element with an sr-only class that will state something like β€œThe previous price was…” and use CSS to make it only visible to screen readers.

I hope you find it helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

1

@Duzoka

Posted

@0xAbdulKhalid Hi! Thank you so much. Soon i'll solve all this problem. Thank more one time <3

0
Sumitβ€’ 90

@SumitMish23

Posted

Learn More about semantic HTML

0

@Duzoka

Posted

@SumitMish23 Do you have some element recommendation?

0

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