@Jeen-Presh
Posted
Hey there! 👋 Here are some tips to help improve your code:
- Your whole content is supposed to be wrapped in a main html element
- The image’s doesn’t have an alt tag description, this needs to be improved upon ⚠️. It improves accessibility for screen readers
More Info:📚https://www.w3.org/WAI/tutorials/images/
- The HTML
<picture>
element allows you to display different pictures for different devices or screen sizes. ⚠️. The picture element will facilitate this.
Here is an example of how it works: EXAMPLE
Syntax:
<picture>
<source media="(min-width: )" srcset="">
<img src="" alt="">
</picture>
More Info:📚 https://www.w3schools.com/html/html_images_picture.asp
- The old price (169.99) is not being properly announced to screen readers. To fix this, you are going to wrap the the price in a del element and inside it you will add a span element with an sr-only class that will state something like “The previous price was…” and use CSS to make it only visible to screen readers.
More Info:📚https://developer.mozilla.org/en-US/docs/Web/HTML/Element
-
The only heading in this component, is the name of the perfume; “Gabrielle Essence Eau De Parfum” . The rest of the text should be wrapped in a paragraph element.
-
Your "button" was created with the incorrect element. It should be created using the button element. So that when the user clicks on the button (with the help of JS) it should add the product to the cart.
More Info:📚 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
Happy Coding!
Marked as helpful
@VCarames
Posted
Hi @Jeen-Presh 👋!
While I appreciate you wanting to help out the FEM community (I’m very flattered that you gave taken a liking to my suggestions style), I noticed that you are simply copy-and pasting my comments, word for word, even the emojis on other users feedback.
More examples:
https://www.frontendmentor.io/solutions/product-preview-card-component-tO-5T0LAG7
https://www.frontendmentor.io/profile/Jeen-Presh
I highly suggest, rewriting the suggestions, in your own words. You want to contribute to the community in your own way. Create your own style, be yourself. Not a copy of me.
Again, Thank you for contributing to the FEM community!
Happy Coding! 🎆🎊🪅
@Jeen-Presh
Posted
@vcarames
noted
Love your style lol. will re work on my suggestion style as requested
@sova-main
Posted
@Jeen-Presh Thank you so much for this information! I've learn a lot 😊