Design comparison
Community feedback
- @VCaramesPosted about 2 years ago
Hey @Nasir222222, some suggestions to improve you code:
-
Stay away from IDs when naming your content. They are not reusable and are mainly used for JavaScript. Its best practice to use, classes for your naming convention as classes are reusable, making them ideal for CSS styling.
-
The Alt Tag description for the image needs to be improved upon. You want to describe what the image is; they need to be readable. Assume you’re describing the image to someone.
-
You are not using the Picture Element correctly. In this challenge you were provided with two images, one for mobile and the other for desktop. Unfortunately, you only used one. You need a Source Element. Heres how it should look like:
Syntax:
<picture> <source media="(min-width: )" srcset=""> <img src="" alt=""> </picture>
Source:
https://www.w3schools.com/html/html_images_picture.asp
https://web.dev/learn/design/picture-element/
-
There should only be one heading in this challenge and thats for the Perfume’s Name. Everything else should be using a Paragraph Element.
-
The old price is not being announced properly to screen readers. You want to wrap it in a Del Element and include a sr-only text explaining that this is the old price.
Happy Coding!
0 -
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