Product Preview Card Component ( HTML | CSS ) :D
Design comparison
Solution retrospective
Happy Coding ;D
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @Abiekatkam 👋, good job on completing this challenge! 🎉
I like this solution for the challenge. Here are a few suggestions I've made that you can consider in the future if you're looking to improve the solution further:
- Try to use semantic tags in your code. Click here for more information.:
With semantic tags:
<body> <main class="container"> <article class="card"> . . . </article> </main> <body>
- The
<h1>
element is the main heading on a web page. There should only be one<h1>
tag per page, and always avoid skipping heading levels. The HTML Section Heading elements (Reference).
<h1>$149.99</h1>
is not a heading element.- Improve alternative texts by adding descriptive text to the
alt
attribute of the images. The alt attribute enables screen readers to read the information about on-page images and will be displayed instead if an image file cannot load. - You could use the <del> tag to display the old price:
<del> <span class="sr-only">Old price: </span>$169.99 </del>
Note that I added the <span> with the
sr-only
class to thedel
element, this will provide more information about what your old price is about.The
sr-only
class is a class that you can add to hide content visually but is only visible to screen-readers.I hope those tips will help you.
Good job, and happy coding!
Marked as helpful3@AbiekatkamPosted about 2 years ago@MelvinAguilar I'm trying to configure this error. Sure I'll make use of this section to minimize the error. Thank you so much for your kind feedback
1
Please log in to post a comment
Log in with GitHubJoin 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