Design comparison
Solution retrospective
Learning(newbie)
Let me know if you have any tips/tricks
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Congratulations on completing your first challenge! You have done a great job and I can see you are on the right track.
I have some suggestions about your code that might interest you.
HTML π:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- The
<br>
tag is not a semantic element. If a screen reader user is reading the page, they will hear "line break", which breaks the flow of the content. Instead, use CSS properties likemargin
andpadding
to add vertical space between elements.
-
You could use the
<del>
tag to indicate the price that was before the discount. Additionally, you can use asr-only
class to describe the discount. This will help screen reader users to understand that the price was discounted.Example:
<del><span class="sr-only">Old price: </span>$169.99</del>
- The product image is not a decoration. You must not use the background-image property to add the product image. Instead, use the
<img>
tag to add the image. Use the background-image property only for decorative images that do not add any information to the page.
- You can use the
<picture>
tag when you have different versions of the same image πΌ. Using the<picture>
tag will help you to load the correct image for the user's device saving bandwidth and improving performance. You can read more about this here π.
CSS π¨:
- Avoid using uppercase text in your HTML because screen readers will read it letter by letter. You can use the
text-transform
property to transform the text to uppercase in CSS.
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here π.
- Use
min-height: 100vh
instead ofheight: 100vh
. Theheight
property will not work if the content of the page grows beyond the height of the viewport.
- Instead of setting a height for each div, you should use margin or padding properties to add space.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful2@DannyHTMLPosted almost 2 years ago@MelvinAguilar Thanks alot for your feedback, appreciate it! I will work on all of your suggestions!
0 - Use the
- @VCaramesPosted almost 2 years ago
Hey there! π Congrats on completing your first challenge!ππ»
Here are some suggestions to help improve your code:
- FEM Best practice β , before moving on to the next challenge, always check your FEM report (It provides value information), to see what is incorrect and update your code with it so that you would not make the same mistake over again. This should be the first thing that should be done β οΈ right after submitting the challenge.
- Your
CSS Reset
is being underutilized. π’ To fully maximize π― it, you will want to add more to it. Here are some examples that you can freely use π: Josh Comeau Reset Eric Meyer Reset
- Your content is not fully responsive. π’ Here is a link to Google Developerβs site that will teach you how make it 100% responsive:
- Implement a "Mobile First" approach π± > π₯
Mobile devices are now the dominant π way in which people browse the web, it is critical that your website/content looks perfect π― on all mobile devices.
More Info: π
- For improved accessibility π for your content, it is best practice β
to use
em
formedia-queries
. Using this unit gives users the ability to scale elements up and down, relative to a set value.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! πππͺ
Marked as helpful0@DannyHTMLPosted almost 2 years ago@vcarames Thanks alot for your information! I will read it all and start using it! I might redo the website using all the tips I got, that would be a good learning challenge.
1@VCaramesPosted almost 2 years ago@DannyHTML
Glad I could help! π
Marked as helpful1
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