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

JJโ€ข 160

@JeremyPaymal

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


Can I improve this code ?

Especially for the responsive part, I think I can improve it.

Thks !

JJ

Community feedback

@catherineisonline

Posted

Instead of using

<button class="process_btn"><a href="#">Proceed to Payment</a></button>

try to use only button tag or only a tag, don't use them together. a tag is usually goof if you are going to move to different page and button is good for submitting forms, for example, or for popups, modal, togging - something that doesn't redirect to somewhere else

Marked as helpful

0

JJโ€ข 160

@JeremyPaymal

Posted

@catherineisonline Thks !

JJ

0
Sinisa Vukmirovicโ€ข 1,690

@SinisaVukmirovic

Posted

Hello!

Yes you can improve your code, any code can be improved.

Start by using more semantic elements not just <main> tag.

Also, to fix errors in your report, it cannot be link <a> inside of <button>. It is either-or. Either link or a button. Link shouldn't be inside of a button.

Some guideline when to use link and when to use button, are:

  • Use link when clicking on it does something to change/affects the site. Change the page, modal pops up, something like that.
  • Use button when clicking on it doesn't change/affects the side. Submit button of some form, something like that.

Hope this helps!

Marked as helpful

0

JJโ€ข 160

@JeremyPaymal

Posted

@SinisaVukmirovic Hello !

All right, I change and I left only the a tag. Thanks for the explanation.

For your first point, when you said that I have to use more semantic elements, you mean I should use them instead of using the div tag ?

Thanks !

JJ

0
Sinisa Vukmirovicโ€ข 1,690

@SinisaVukmirovic

Posted

@JeremyPaymal Some instead and some to hold the DIVs inside of them. It depends on the structure of the site. Each site is different.

Marked as helpful

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