Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

results-summary-component-main

@Mahmoud-Abdelkarim777

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

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 your index.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 and padding to center the component both horizontally & vertically. Because using margin or padding will not dynamical centers our component at all states
  • To properly center the component in the page, you should use Flexbox or Grid 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-Abdelkarim777

Posted

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.@0xAbdulKhalid

0
Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

@karama777 Glad you found it helpful ! 🀠

0
Amer Shahβ€’ 260

@fggdbdsbfd

Posted

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-Abdelkarim777

Posted

@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 GitHub
Discord logo

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