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

JJ 160

@JeremyPaymal

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


I did this challenge with HTML and CSS only.

Does it require to use Javascript or a framework like React?

Can I improve my code as it is now ? I 'd like to optimise it. I'm pretty sure I can reduce the css line.

Thanks !

Community feedback

tan 640

@tan911

Posted

Hello @JeremyPaymal, maybe this will help and improve your code:

  • Wrap your content with "main" element or use a "role" attribute for your div with the value of "main", so it should look like this: <div role="main" class="content"></div>. I suggest you should use main element as sematic html for accessibility and best practices.
  • Do not use pixels for font sizes instead use rem for that, so that your audience can be able to see the text base on their preferred font sizes.

Hope it helps, Thanks.

Marked as helpful

0

JJ 160

@JeremyPaymal

Posted

Hello @tan911,

Thanks a lot, I'll do the changes !

Jérémy

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