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

P

@JGedd

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 feel free to give your opinion on my solution!

Community feedback

@VCarames

Posted

Hey @JGedd, some suggestions to improve you code:

  • For this challenge you want to use the Picture Element not the Background Image Property. The Background Image Property is mainly used on decorative images NOT images that add value and serve a purpose.

Picture Element will allow your to switch between images in different breakpoints and makes your site load faster by saving bandwidth.

Syntax:

  <picture>
    <source media="(min-width: )" srcset="">
    <img src="" alt="">
  </picture>

Source:

https://www.w3schools.com/html/html_images_picture.asp

https://web.dev/learn/design/picture-element/

  • There is only one heading in this challenge and that is the name of the perfume, “Gabrielle Essence Eau De Parfum”.

  • The old price is not being announced properly to screen readers. You want to wrap it in a Del Element and include a sr-only text explaining that this is the old price.

  • The "shopping cart" icon is decorative, so its Alt Tag* should left blank and have an aria-hidden=“true” to hides it from assistive technology.

Happy Coding! 👻🎃

0
pvkom26 50

@pvkom26

Posted

Well, it looks like you forgot to style the heading (called "product-title" here). Change the font-family to 'Fraunces' and adjust the line-height

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