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

@SauravJalui

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


Hey Everyone 👋,

This is my first Frontend Mentor challenge submission.

Any feedback welcome!

Happy coding 👾

Community feedback

@JulioCinquina

Posted

Hey, @SauravJalui!

Congratulations on completing the challenge, your solution looks exactly like the design!

To improve your semantic markup, I would suggest using the <button> element for the "Add to Cart" button.

A guideline that you can follow is to use a link to let the user go to a different page or to another part of the same page. If the button would trigger an action (adding a product to the cart, in this case), then use the <button> element.

You can read more about it in this guide: A Complete Guide to Links and Buttons (Chris Coyier, CSS-Tricks).

I hope this helps!

Marked as helpful

1

@SauravJalui

Posted

Hey @JulioCinquina,

Thank you so much for the feedback. It was super helpful. Thanks for the css-tricks link as well.

I will update the solution by changing the link to a button element.

Cheers and happy coding 👨‍💻

1

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