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 - Flexbox, responsive and hover state

dkaffesβ€’ 140

@dkaffes

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


I used <a> for the buttons. Should i use the <button> element?

What is the difference between <a> and <button> elements for use as a button link?

The colors part of the style-guide.md was a bit misleading so some colors were picked using a color picker on the preview images given in the design folder.

Community feedback

rayaβ€’ 2,870

@rayaatta

Posted

Hello πŸ‘‹dkaffes, congratulations on completing this challenge πŸŽ‰

I have some suggestions for you.

1 Divs do not carry any semantic value. You should replace

<div class="c-order-summary">

With

<article class="c-order-summary">

2 The illustration hero image is decorative. You should leave it's alt attribute empty i.e alt=""

3 I noticed that you used <h2 class="summary-title"> .since it is the only heading in the document you should replace it with <h1 class="summary-title">.

Here's a quick guide on how to use them:

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/subject for the whole page. Also, do not skip heading levels - start with <h1>, then use <h2>, and so on. You can then style them in you css.

Unlike what most people think, it's not just about the size and weight of the text It is about maintaining a clear and consistent hierarchy through out the document

Lastly,concerning your question.

A button element would be better choice because,if this was a real site.the cancel order would invoke JavaScript to cancel the order and proceed to payment would also call some jscript. But the anchor element is for linking pages or sections of an element so it shouldn't be here

I hope this helps πŸ™ƒ

Otherwise your solution is neatπŸ‘

Happy coding ✌️

Marked as helpful

1

dkaffesβ€’ 140

@dkaffes

Posted

@rayaatta, your answer concerning my question was really helpful! Thanx!

1

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