Design comparison
Community feedback
- @VCaramesPosted almost 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
- It is best practice ✅ to use,
classes
for styling purposes, while usingids
solely for JavaScript.
- Remove all the
br
elements you added, they are unnecessary ❌.
- Your
form
is lacking 😢 a visually hiddenlegend
for accessibility and afieldset
to improve semantics.
More Info: 📚
- For your JS, the
eventListener
should be on theform
⚠️ as asubmit
.
More Info:📚
Click vs. Submit EventListeners
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! 🎆🎊🪅
Marked as helpful0@RondellAllardPosted almost 2 years ago@vcarames How are you so fast!??! lol
Thank you!
1@VCaramesPosted almost 2 years ago@RondellAllard
Glad I could help!
Leaving feedback? 😄 I’ve seen this challenge a hundred times so, I know what to look for in the code.
0@RondellAllardPosted almost 2 years ago@vcarames
Thank you again.
I added classes to style the elements that have ids. I assume this is so that JS can have priority over the design when needed?
I added the legend and fieldset.
I, through much mental frustration, targeted the submit event on the page instead of the button.
0 - It is best practice ✅ to use,
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