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

@Shohanojjaman

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@thomashertog

Posted

Visually very similar to the design so kudos for that.

It has some improvements that can be made though

  • You used an <h1> for the name of the product and an <h4> for the product type perfume. This is not how headings work (imagine reading a book and you have a table of contents going from 1. to 1.1.1.1. but the 1.1. and the 1.1.1. are missing). Don't use headings for styling, do that in your CSS
  • The product image is meaningful content so it should be in the HTML (not added as a background-image)
  • The icon on the button is purely decorative so it should be added via CSS (with the use of pseudo elements) or hidden from assistive technology
  • Using absolute positioning for the icon in the button feels really weird, though can be fixed with along with the previous one
  • The button does not have a type attribute (type=button will do)
  • There's a typo in the name of your dark-cyan color (may seem small, but typo's will eventually haunt you later on when trying to reuse variables), also casing is inconsistent
  • Font-size (as well as padding/margin) should be in em/rem

Marked as helpful

1

@thomashertog

Posted

@Shohanojjaman if you need help there is the #help channel on Discord where you can ask questions, there is quite the big community over there!

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