@MelvinAguilar
Posted
Hi @MohamedAtTop π, good job on completing this challenge, and welcome to the Frontend Mentor Community! π **
It's a great solution and a good start. I have some suggestions you might consider to improve your code:
-
Use the
<main>
tag to wrap all the main content in your solution rather than<div class="main">
. -
Instead of using pixels in font size, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference. -
Try to use more descriptive names for your classes. I suggest you learn the BEM naming convention standard for CSS class names because increases the readability of front-end code and provides a modular structure. For example, the classes "now" and "per" do not say what they are.
-
You can use a <picture> tag when you need to change an image in different viewports. Using this tag will prevent the browser from loading both images, saving bandwidth and preventing you from utilizing a media query to modify the image.
Example:
<picture>
<source media="(max-width: 530px)" srcset="./images/image-product-mobile.jpg">
<img src="./images/image-product-desktop.jpg" alt="your_alt_text">
</picture>
- Use an h1 tag for your solution. 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; Always start from<h1>
, followed by<h2>
, and so on up to <h6> (<h1>,<h2>,...,<h6>). The HTML Section Heading elements (Reference)
Solution:
<h1>Gabrielle Essence Eau De Parfum</h1>
I hope those tips will help you! π
Good job, and happy coding! π
Marked as helpful