Design comparison
Solution retrospective
My solution for QR code component challenge. Do you have any suggestion?
Links
- GitHub: Nepcen
- LinkedIn: Yusuf Abacık
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there 👋. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML 📄:
- Wrap the page's whole main content in the
<main>
tag.
- The text
Improve Your Front-End Skills by Building Projects
is considered a heading element.
- The <br> tag is often used to create line breaks, but it doesn't convey any semantic meaning. When a screen-reader reads the text, it will break the flow of reading at the line break tag, which can be confusing for users. More information here.
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 📘.
- The
width: 100%
property in thebody
tag is not necessary. Thebody
tag is a block element and it will take the full width of the page by default.
- Use
min-height: 100vh
instead ofheight: 100vh
. Theheight
property can cause your component to be cut off on small screens, such as a mobile phone in landscape mode.
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful2 - Wrap the page's whole main content in the
- @thekingvicePosted almost 2 years ago
Looks pretty good! You should definitely try to move away from using pixels as a unit, and try to use relative units like rem. Also I know divs are easy but I would explore semantic HTML so your code can be a little bit more descriptive.
Here's some great videos to help you on your journey, they cover CSS units and semantic HTML:
CSS UNITS: https://youtu.be/N5wpD9Ov_To
SEMANTIC HTML https://youtu.be/kGW8Al_cga4
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