QR code component challenge using HTML and CSS
Design comparison
Solution retrospective
- the challenge is pretty easy and there are no difficulties at all
- I think I am unsure of the CSS variables part, I think I didn't need them
- No, no questions at all <3
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @WeirdAssProgrammer 👋, good job completing this challenge, and welcome to the Frontend Mentor Community! 🎉
I like this solution for the challenge. Here are a few suggestions I've made that you can consider in the future if you're looking to improve the solution further:
- Try to use semantic tags in your code. Click here for more information.:
With semantic tags:
<body> <main> . . . </main> <footer class="attribution"> . . . </footer> <body>
- Rename the class of your <div class="attribution"> element, that class for what it means, should be contained in the footer.
- Instead of using pixels in font size, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference. - Use an h1 tag for your solution. The
<h1>
element is the main heading on 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 class="p-main par p-main-head">Improve your front-end skills by building projects</h1>
- You could use a CSS Reset to remove browser built-in styles and reduce browser inconsistencies. Your body's default margin causes the vertical scrollbar to appear.
Popular reset style sheets:
I hope those tips will help you.
Good job, and happy coding!
3 - @LovelyFaisalPosted about 2 years ago
Hi! You've done great 💪
Here are some suggestions to improve your code:
-
The component isn't centered correctly on larger screens to solve it you need to change
max-width: 1440px;
frombody
tomax-width: 100%;
-
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.
Click here for more information
Good job, and happy coding!
2 -
- @PhoenixDev22Posted about 2 years ago
Hello MohamedYousry
Congratulation on completing your first frontend mentor challenge.
Well done ! you have already received some incredible feedback from @Melvin Aguilar 🧑🏻💻 and @Faisal Alharbi which is nice to see , just going to add some suggestions as well and
HTML
- The alternate text should indicate where the Qr code navigate the user : like
QR code to frontend mentor
not describes the image.
- The title attribute is used to provide additional information to help clarify or further describe the purpose of a link, it can not be hyphenated , it should be human readable. Don’t use a link title to provide the information over again, as this is a usability fail that will only result in annoying your users.
You should not use a link title if you’re just repeating the anchor text.
Overall, excellent work! Hopefully this feedback helps.
1 - The alternate text should indicate where the Qr code navigate the user : like
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