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

Order summary component

@msbarghini

Desktop design screenshot for the Order summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What did you find difficult while building the project? I found this project ok! I did have to do a bit of experimenting with the little grey box that had the subscription info a bit challenging but figured it out. Also, trying to get the background to work.

Which areas of your code are you unsure of? Not sure of responsive mode. I was playing around with it and couldn't find a break point so I guess it's ok?

Do you have any questions about best practices? Any feedback for media queries and how to centre a div! I always get stuck on this. Thank you!

Community feedback

Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

Hello @msbarghini!

Your solution looks great!

I have a couple of suggestions for improvement:

  • First: In order to make your HTML code more semantic, use <h1> for the main title instead of <h5>. Unlike what most people think, it's not just about the size and weight of the text.

šŸ“Œ The <h1> to <h6> tags are used to define HTML headings.

šŸ“Œ <h1> defines the most important heading.

šŸ“Œ <h6> defines the least important heading.

šŸ“Œ Only use one <h1> per page - this should represent the main heading/title for the whole page. And don't skip heading levels - start with <h1>, then use <h2>, and so on.

  • Second: Still about semantic HTML, use <main> to wrap the main content instead of <div>.

All these tag changes may have little or no visual impact but they make your HTML code more semantic and improve SEO optimization as well as the accessibility of your project.

I hope it helps!

Other than that, great job!

Marked as helpful

0

@msbarghini

Posted

@danielmrz-dev

Thanks for the feedback, I didn't know about heading semantics that's really interesting!

Also, you're right, I was supposed to use "main" instead of DIV and completely forgot, thanks for pointing that out! I'll make sure to do that with the next challenge :)

1
Leanghokā€¢ 170

@leanghok120

Posted

I do have some feedbacks for you, my first one is to scale the website up a bit, maybe make it a little bit bigger for 100% because I think you developed this for 150% (zoom). My second feedback is that you don't need to have a media query for this project at all, I did it with no media query and that is usually the best practice, if you could do it without media query then you should. And to center a div, you just have to:

.container {
   display: flex;
   justify-content: center; /* align the div center horizontally */
   align-items: center; /* align the div center vertically */
}

Marked as helpful

0

@msbarghini

Posted

@leanghok120

Great to know about the media queries, I always get stuck on that.

And thanks for the centering DIV code :)

Much appreciated!

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