@VCarames
Posted
Hey @Mus3b3bdo, adding to what was said above/below:
- Implement a Mobile First approach 📱
With mobile devices being the predominant way that people view websites/content. It is more crucial than ever to ensure that your website/content looks presentable on all mobile devices. To achieve this, you start building your website/content for smaller screen first and then adjust your content for larger screens.
-
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.
-
To give you HTML code structure, you want to set up your code in the following manner (only did parent containers):
<body>
<main>
<article class=“card-container”>
<picture></picture>
<div class="card-content">
</div>
</article>
</main>
<footer class="attribution"></footer>
</body>
The Main Element identifies the main content of the document.
While the Article Element will serve as the card’s container, because the card represents a complete, or self-contained, section of content that is, in principle, independently reusable.
More info:
https://web.dev/learn/html/headings-and-sections/
-
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.
-
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.
-
The "shopping cart" icon 🛒 is decorative, so its Alt Tag should left blank and have an aria-hidden=“true” to hides it from assistive technology.
Happy Coding! 👻🎃
Marked as helpful