Design comparison
Solution retrospective
I am new to HTML, CSS . I need help to resolve the Accessibility Issues and HTML issues in my code . I also need feedback on best practices.
Community feedback
- @correlucasPosted about 2 years ago
๐พHi @henry-dura, congratulations on your first 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:
Fix the alignment. The best way make this alignment is by using
FLEXBOX
. The first step, is to addmin-height: 100vh
to make the body height size becomes 100% of the viewport height, this way you make sure the container will be aligned vertically since thebody
will display ever 100% of the screen height. After that add two flex properties to make the alignmentdisplay: flex
/align-items: center;
/justify-content: center;
. If you're using the attribution you need to addflex-direction: column
to make the attribution stays under the QR Code component. See the code below:body { min-height: 100vh; background-color: hsl(212, 45%, 89%); font-size: 15px; font-family: 'Outfit', sans-serif; font-weight: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; }
Use
<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.Replace the
<h3>
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.โ๏ธ I hope this helps you and happy coding!
Marked as helpful0@henry-duraPosted about 2 years ago@correlucas Thank you very much for your detailed explanations. I hope to receive more feedback from you as I continue practicing.
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