@MelvinAguilar
Posted
Hi @AyushKeshwan π, good job for completing this challenge and welcome to the Frontend Mentor Community! π
Here are some suggestions to improve your code:
1.Try to use semantic tags in your code. More information here:
With semantic tags:
<body>
<main class="container">
. . .
</main>
<body>
2.- Add a <h1>
tag in your solution, The <h1>
element is the main heading in 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>
3.Use justify-content: center;
to body
element to correctly center the content and remove margin: 0 auto;
from .container
selector
- Use
margin: 0.625rem
ormargin: 10px
in the.container
selector so that it has some space when viewed on mobile devices.
Instead of using px
in font-size
, use relative units of measure like rem
or em
. Font size in absolute length units (px) does not allow a user with limited vision to change the text size in some browsers. Reference.
I hope those tips will help you.
Good Job and happy coding !
Marked as helpful
@AyushKeshwan
Posted
Hii @MelvinAguilar π, Thank you so much for reviewing my code.
As I am still a newbie here , I'm still confused with so many things like
Should I start using <main> for most of the time , how'd I know when to use div or article or section tag ?
Thank you once again for the help ^^
@MelvinAguilar
Posted
@AyushKeshwan
- The
<main>
tag specifies the main content of a document. - The
<div>
tag It has no semantic meaning and is a simple box, It is used to have a container styled with CSS, set special alignment or the content needs a special positioning. - The
<section>
tag defines a generic section in a document - The
<article>
tag specifies independent content. The content of the article tag makes sense on its own and you can put that same article on a separate page and still make sense.
Marked as helpful