@Kyr27
Posted
Best practices:
- Always use indentation, some of your divs are not indented and that makes it harder to review code.
- Use a more descriptive alt attribute for your image.
- Don't use whitespace in your code:
<p> <span class="perfume">P E R F U M E</span></p>
Instead use letter-spacing in your styles.css for that element:
.perfume {
letter-spacing: 0.1875rem;
}
- Avoid using pixels as they're non-responsive, use rem or em instead.
- Instead of using:
text-decoration: line-through;
Use the <s>
element in your index.html instead which is part of semantic HTML:
<p><span class="discount-price">$149.99</span><s><span class="before-price">$169.99</span></s></p>
- Whenever linking to another website, use the
rel="noopener"
attribute(for security reasons)
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank" rel="noopener">Frontend Mentor</a>.
- Avoid using
<span>
to make a new line, it would be a nightmare to maintain. - If you're using Visual Studio Code, i would recommend you get the prettier extension and format your code using it.
Regarding your question of whether it's possible to build sites using only HTML and CSS for multiple platforms, the answer is yes, and that is the point of this challenge. To build for multiple platforms you should learn Flexbox and/or CSS Grid.
Marked as helpful
@HenriqueCosta05
Posted
@Kyr27 Thank you for your reply, it is really helpful to me.
@Kyr27
Posted
@HenriqueCosta05 If you're new to Web dev i recommend you see Kevin's video on this exact same challenge, he will explain it better than i can: https://www.youtube.com/watch?v=B2WL6KkqhLQ
Marked as helpful