An anchor element cannot be nested within a button or vice-versa. On the second point, it looks like it is an anchor element instead of a button
Marked as helpful
Nice work Darren.
For the buttons and the anchor:
<a href="#">Change</a>
, what do you think , selecting this change link/button does? It appears as if the button has to open maybe a form so that you can make some changes. If that is correct then that has to be a button<button class="pay">Proceed to Payment</button>
, on this one , this maybe be a navigation to the Payment page .Well if you have some suggestions on the buttons let me know
Happy coding
Marked as helpful
@wongd-hub
Posted
Thank you, @ChamuMutezva!
Great point on the <a>
tag best being a <button>
, I'll have to pay closer attention to what each component should be doing in the future.
As to your second point; did you mean that the button should perhaps have a href
attribute since its purpose is to link to something?
Thank you again!
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