QR Card with CSS flexbox

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
Please log in to post a comment
Log in with GitHubCommunity feedback
- @correlucas
👾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 helpful - @md5dalton
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 helpful - Replace this
Join 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