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 Only Using HTML and CSS

Rizki Bagusβ€’ 50

@RizkiB12

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


What did you find difficult while building the project?

  • Let me know how to use best @media for mobile

Do you have any questions about best practices?

  • Please all in the front end mentor review my code, and what should i add for my work to build this

Community feedback

Ferβ€’ 3,970

@fernandolapaz

Posted

Hi πŸ‘‹, perhaps some of this may interest you:

HTML 🧱, ACCESSIBILITY βš–:

  • The main content of every page (the card in this case) should be wrapped with the <main> tag.
  • No need to wrap each element with a <div>, better to use semantic elements like <img>, <h1> or <p> directly.
  • There are two images for this challenge, and to show different images depending on the device or screen size, the <picture> element is ideal:
<picture>
<source media="(min-width: 680px)" srcset="images/image-product-desktop.jpg">
<img src="images/image-product-mobile.jpg" alt="description">
</picture>
  • The icon is a decorative image and therefore needs an empty alt attribute to be ignored by a screen reader.

CSS 🎨:

  • It might be good to get used to designing with the mobile first approach, which means designing for mobile first and then for desktop or any other device, as it is widely considered best practice.

I hope it’s useful πŸ™‚

Regards,

Marked as helpful

1

Rizki Bagusβ€’ 50

@RizkiB12

Posted

@fernandolapaz Hello, thank you so much about your review, may God bless you

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