Design comparison
Solution retrospective
I still had some problems with responsiveness. But I think the result is quite good. Check at my code and let me know if it's good or not 'cause I know I still have a lot to learn !
Community feedback
- @correlucasPosted about 2 years ago
๐พHi @lauryne921, 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. - 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. - Add a margin of around
margin: 20px
to avoid the card touching the screen edges while it scales down. - Reduce your code by removing unnecessary elements. The HTML structure is working but you can reduce at least 20% of your code by cleaning the unnecessary elements, you start cleaning it by removing some unnecessary
<div>
. For this solution you wrap everything inside a single block of content using<div>
or<main>
(better option for accessibility) and put inside the whole content<img>
/<h1>
and<p>
.
<body> <main> <img src="./images/image-qr-code.png" alt="QR Code Frontend Mentor" > <h1>Improve your front-end skills by building projects</h1> <p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p> </main> </body>
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@lauryne921Posted about 2 years ago@correlucas Hi ! Sorry for the late response but thank you to help me with the different projects ! So I change the <div> by <main> and yes I did some mistakes that I don't do usually like for the title <h1> but thanks to tell me. The margin: 20px you tell me to add is for the title ?
Once again thank you !
By the way, I checked your solution and I love it, you even added a light mode, that's cool
0 - Use
- @lauryne921Posted about 2 years ago
I have just one question, how you center the project in the middle of the page ? I tried something but it didn't really work
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