Design comparison
Solution retrospective
Hello all,
This is my first Frontend Mentor challenge using JavaScript. This challenge took me a bit longer than the others because I had quite a bit of trouble getting the sizing (and padding etc) of all the elements as close to the design as possible. Same with the colours - I think they're a bit off, the card background in particular.
I noted down quite a few questions during the challenge, and I'd be stoked if anyone would like to answer them. I'm also open to any feedback at all.
First, I'd like to know if it's best practice to put the "rating buttons" (the 1-5) in an unordered list, or as a form? I went with an UL, but I feel like maybe they should have been radio buttons in a form. I'm not sure.
Second question, is the submit button supposed to be an onClick, or an addEventListener? I used onClick for the submit button, and addEventListener for the rating buttons, but I'm not sure the best way to have done either.
My final question is regarding the fact there are two h1 tags in the document, and whether or not this is ok? Both "states" have their own h1 tag.
Thanks in advance for any comments or feedback.
Community feedback
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