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

jesse610 20

@jesse610

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


Hi! Thanks for taking a look at my work.

Is the way my HTML structured considered best practice with the divs and the class names?

And in my CSS, I was unsure of the naming best practices as well.

Thanks, Jesse

Community feedback

Hassia Issah 50,650

@Hassiai

Posted

Replace <div class="section"> with the main tag to fix the accessibility issues. click here for more on web-accessibility and semantic html

To center .main on the page using flexbox, replace the height in .section with min-height: 100vh. There is no need to give .section a height value and padding value in the media query. For a responsive, in the media query give .main a max-width value.

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

1

jesse610 20

@jesse610

Posted

@Hassiai Thank you very much for your feedback!

0

@fibonacci001

Posted

you can choose to use Use descriptive class names, Class names should describe what the element does, not how it looks. For example, use .btn for a button, rather than .red-btn for a red button. Minimize the use of generic class names: Avoid using generic class names like .container or .row, which may not accurately describe the purpose of the element. although HTML structure are largely subjective and can vary based on personal preferences and specific project requirements. hope this was helpful Jesse

Marked as helpful

1

jesse610 20

@jesse610

Posted

@fibonacci001 Great, thank you for the feedback!

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