Hi there π, Iβm Loai and this is my solution for this challenge. π
Design comparison
Solution retrospective
Any suggestions on how I can improve and reduce unnecessary code are welcome!
Thank you. πβοΈ
Community feedback
- @PipouwPieuwPosted over 1 year ago
Hello Loai, well done once again !
I noticed a small issue with your
Proceed to payment
button. Currently only its label is clickable but ideally we should be able to click anywhere on the button to trigger it. This is because you applied the styles to the wrapper elementcard__accept--button
. Instead you should apply them to the <a> inside.Otherwise your component looks good! Well done :)
Marked as helpful1 - @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing your fifth challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML π·οΈ:
-
The
role="main"
is unnecessary for elementmain
-
The
main
landmark role is used to indicate the primary content of a document. It can be added to an element by usingrole="main"
, but instead itβs preferable to just use the<main>
element. -
In that case, itβs unnecessary to make the
main
role explicit.
Examples:
<div role="main"> *this is a valid way to define a main role* </div> <main> *but this is shorter and uses correct semantic HTML* </main>
I hope you find it helpful ! π Above all, the solution you submitted is great
Happy coding!
Marked as helpful1
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