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 with HTML and CSS

Mason Dunn 100

@mason-dunn

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 are some best practices when naming HTML classes (and even CSS variables)? What could I improve on?

Community feedback

Account Deleted

Great work! Good question!

Based on your work, this <div class="card"> should be replaced with a class of main <main class="card"> further sub div should be name as <section></section>. For example in your work <div class="card-image"> and <div class="card-info"> should be <section class="card-image"> and <section class="card-info">

If there is any footer, rather than using the div tag, use the footer tag <footer></footer>.

Also try to always comment your section (both html and css) so code reviewer can follow up your work easily.

If you found any of these helpful, please give it a like.

Happy Coding!

Marked as helpful

1

Mason Dunn 100

@mason-dunn

Posted

@BMdirac Thank you! I will keep this in mind for the next challenge :)

0

Account Deleted

@mason-dunn Alright. Good.

0

Account Deleted

To improve more on css variable I'd advise you learn sass (synthetic Awesome Style Sheet).

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