QR code component HTML | CSS Grid & Flexbox
Design comparison
Solution retrospective
Q: What did you find difficult while building the project? A: 1. How to center the content to the middle. 2. I had trouble finding a more efficient way when using CSS, I had to go the extra mile to center the content when I probably could've used some other properties for instance.
Q: Which areas of your code are you unsure of? A: 1. The class names. Couldn't think of better names for classes that were descriptive. 2. HTML Structure. Probably used to many unnecessary divs. 3. CSS properties.
Q: Do you have any questions about best practices? A: Is there a more efficient way to name classes and structure HTML content? What's a different, more efficient way to center content?
Community feedback
- @AdrianoEscarabotePosted almost 2 years ago
Hi fsuropaty, how are you? I really liked the result of your project, but I have some tips that I think you will enjoy:
To remove the scrollbar, we can do this:
body { margin: 0; }
The most appropriate element for this content:
<p class="content-title">Improve your front-end skills by building projects</p>
since this is the main title and every page needs to have an
h1
tag to inform what the main title is!Images must have alt text unless it is a decorative image, for any decorative image each IMG tag must have empty
alt=""
and addaria-hidden="true"
attributes to make all the assistive technologies of the Web, as screen reader. Learn the differences between decorative/meaningless images vs important content.The rest is great!
I hope it helps... 👍
Marked as helpful1@isaacfleurivilPosted almost 2 years ago@AdrianoEscarabote Thanks a ton Adriano, the link you sent me was extremely helpful.
0 - @denieldenPosted almost 2 years ago
Hello Isaac, You have done a good work! 😁
A: More efficient way to name classes is describe shortly the part (*ex. card, container, *) and for structure HTML content must stay clean and focus on accessibility B: More efficient way to center content is using flexbox or grid
Some little tips to improve your code:
- add
margin: 0
to body to remove the scoolbar of browser - use
main
tag to wrap the card and improve the Accessibility but not as a container of that one element - also you can use
article
tag instead of a simplediv
to the container card for improve the Accessibility - add descriptive text in the
alt
attribute of the images - instead of using
px
use relative units of measurement likerem
-> read here
Keep learning how to code with your amazing solutions to challenges.
Hope this help 😉 and Happy coding!
Marked as helpful1@isaacfleurivilPosted almost 2 years ago@denielden Thank you Deniel, your feedback was well received and motivated me to continue my journey.
1@denieldenPosted almost 2 years ago@isaacfleurivil you are welcome and keep it up :)
1 - add
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