results-summary-component-main
Design comparison
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing the challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML π·οΈ:
- This solution generates accessibility error reports, "All page content should be contained by landmarks" is due to incorrect usage of
semantic
markup, which causes lacking of landmark for a webpage
- So fix it by replacing the
<section class="containers">
element with the semantic element<main>
along with<div class="attribution">
into a<footer>
element in yourindex.html
file to improve accessibility and organization of your page.
- What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like
<div>
or<span>
. They are use to provide a more precise detail of the structure of our webpage to the browser or screen readers
- They convey the structure of your page. For example, the
<main>
element should include all content directly related to the page's main idea, so there should only be one per page
CSS π¨:
- let me explain, How you can easily center the component.
- We don't need to use
margin
andpadding
to center the component both horizontally & vertically. Because usingmargin
orpadding
will not dynamical centers our component at all states
- To properly center the component in the page, you should use
Flexbox
orGrid
layout. You can read more about centering in CSS here π.
- For this demonstration we use css
Grid
to center the component
body { min-height: 100vh; display: grid; place-items: center; }
- Now remove these styles, after removing you can able to see the changes
.containers { margin: 20vh 20vw; }
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy coding!
0@Mahmoud-Abdelkarim777Posted over 1 year agoI am very happy with your feedback, and I thank you very much. I will take your advice into consideration in my future designs, as I am still a beginner.@0xAbdulKhalid
0@0xabdulkhaliqPosted over 1 year ago@karama777 Glad you found it helpful ! π€
0 - @fggdbdsbfdPosted over 1 year ago
I'd be happy to give you some advice on the topic of landmarks in HTML documents! Here are some tips, presented in bullet points with a professional tone and a few helpful emojis:
-π Every good HTML document should have a main landmark! This landmark helps users understand the structure of the page and navigate it more easily.
-π The main landmark should typically be the <main> element. This element should contain the main content of the page, such as articles, posts, or product listings.
-π You can use ARIA attributes to help identify your main landmark and make it more accessible to users who rely on assistive technologies.
-π§ Remember that other landmarks, such as <header>, <nav>, <aside>, and <footer>, can also be helpful for organizing your content and making it easier to navigate.
-π» When designing your HTML document, it's important to consider the needs of all users, including those with disabilities. By using proper landmarks and ARIA attributes, you can make your site more accessible and user-friendly for everyone.
-I hope these tips help you create an organized and accessible HTML document with a clear main landmark! If you have any more questions, feel free to ask.
0@Mahmoud-Abdelkarim777Posted over 1 year ago@fggdbdsbfd I am very happy with your feedback, and I thank you very much. I will take your advice into consideration in my future designs, as I am still a beginner.
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