Design comparison
Solution retrospective
This was actually my very first Frontend Mentor challenge, it's just that I didn't know how to submit my work back in the days (read 3 months ago). QR Card was built with HTML and vanilla CSS. Hope you guys like it. xo
Community feedback
- @correlucasPosted about 2 years ago
πΎHi , 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:
1.Add
<main>
instead of<div>
to wrap the card container. This way you show that this is the main block of content and also replace the div with a semantic tag.2.Replace the
<h2>
containing the main title with<h1>
note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.3.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.
4.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 helpful2@NoelaOstPosted about 2 years ago@correlucas Yes it is helpful, thank you for your advice. I will definitely remember that for my future projects.
Happy coding as well!
1 - @md5daltonPosted about 2 years ago
Hello Noela Ost π
Congratulations on completing this challenge. Impressive work π
If you want to fix some of those accessibility issues, you should try to use semantic HTML markup wherever you can. This will help screen readers to better navigate your web apps. Here's a few suggestions I'd make:
- Replace this
<div class="container">
with<main>
. - Replace this
<div class="card">
with<section>
. (optional) - If you're going to use
h
tags and you should always start at<h1>
and if it doesn't match your styling, you can always modify it's typography.
Wish you the best in your journey into web development. π
Marked as helpful1@NoelaOstPosted about 2 years ago@md5dalton Thank you very much for your advice and good wishes. All the best in your journey too.
1 - Replace this
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