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 Preview Card Component with HTML & CSS

@nosquodev

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


How would you optimize this code? What would you change about this code? What best practices would you have implemented?

¿Cómo optimizarías este código? ¿Qué cambiarías de este código? ¿Qué mejores prácticas hubieras implementado?

Community feedback

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

iMAGES 📸:

  • alt text is a descriptive text attribute added to an HTML image tag that provides a textual description of an image for users who are visually impaired or cannot see the image for any other reason.
  • The purpose of alt text is to convey the meaning and context of an image to these users so that they can understand the content and information conveyed by the image.
  • But here, The svg's are just used as a decoration material.
  • Meanwhile it also needs an alt attribute with empty value
  • Eg: <img src="./assets/images/icon-cart.svg" alt="" aria-hidden="true">

.

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

Happy coding!

Marked as helpful

0

@nosquodev

Posted

@0xAbdulKhalid thank you so much Abdul! Happy coding! 🎆

0
Stephen 190

@wongstephen

Posted

Great job! In my opinion, there usually isn't much room to optimize plain html and css code on a small project. But what is noticeable is the responsiveness of the image, in which you are using a background image. It grows unproportionally around the tablet size. Instead, I suggest using the <picture> html tag where you can set media queries to size your image appropriately and keep the proportions accurate.

Marked as helpful

0

@nosquodev

Posted

@wongstephen Thanks Stephen! I will keep it in mind! Happy coding! 🎆

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