Design comparison
Solution retrospective
Any feedback is welcome... Thanks in advance :)
Community feedback
- @correlucasPosted about 2 years ago
๐พHi @Tchilo, congratulations on your solution!๐ Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw youโre on the right track. Iโve few suggestions for you that you can consider adding to your code:
- Use
<main>
instead of a simple<div>
this way you improve the semantics and accessibility showing which is the main block of content on this page. Remember that every page should have a<main>
block and that<div>
doesn't have any semantic meaning. - The main heading has the tag
<h2>
, in this case, you should replace it with<h1>
since this heading is the main title on this page. Remember that every page should have one<h1>
to declare which is the most important title and that you should follow the hierarchy using the heading sequence(h1, h2, h3, h4, h5)
and never jump a level. - Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.
- Add a margin of around
margin: 20px
to avoid the card touching the screen edges while it scales down. - Use relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.
Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
โ๏ธ I hope this helps you and happy coding!
Marked as helpful0@TchiloPosted about 2 years ago@correlucas Many thanks for the suggestions they have really been helpful I will need to work on my semantics. I really appreciate your time to give me helpful feedback... I love the way you made yours!!
0 - Use
- @MelvinAguilarPosted about 2 years ago
Hi @Tchilo, good job for completing this challenge! ๐
Here are some suggestions to improve your code:
-
Update the solution with the correct link of the GitHub repo if you want them to see how you did it
-
Try to use semantic tags in your code. More information here:
Without semantic tags:
<body> <div class="contain"> </div> <body>
With semantic tags:
<body> <main class="contain"> </main> <body>
-
Add descriptive text in the
alt
attribute of the images, the text should describe the image, The alt attribute enable screen readers to read the information about on-page images and will be displayed instead if an image file cannot load -
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)
For example:
<h1>Improve your front-end skills by building projects</h1>
I hope those tips will help you.
Good Job ! :)
Marked as helpful0@TchiloPosted about 2 years ago@MelvinAguilar Sorry about not having access to the code I forgot to remove the repo from private. Many thanks for the time you took to give me feedback it has been helpful.
0 -
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