I´ve been working for the lasts days on the projects for Responsive Web Design Pages and I got stuck in the #13 test from the survey project. Maybe you could help me improve my radio buttons, so I can pass the last test of the project.
I´ve tried everything I can think of as well as checked some posts from freeCodeCamp asking for help with the radio buttons. Nothing worked
Be aware that the page is written in Spanish, but I guess you can check the code. I´ve attached an image of the radio buttons. Here is the link as well: https://codepen.io/Lei89/full/daoBYN
I’m thinking your second radio button as a typo in the name attribute. I’m guessing it should be ‘drinks’. You should also wrap your id name in double quotes, id="radio" instead of id=radio. That should help get back on track.
Hey man, real simple fix that makes me mad whenever I do it too lol
You have to check you name attribute in your radio section to either “drinks” or “drink”! I changed the one that wasn’t plural to “drinks” and checked the test. Passed!
I also agree with @TraekWells. It’s good practice to use double quotes for HTML classes/ids/attributes (except for a few attributes that don’t need them, like height and width).
Also, looking at your HTML some more, I noticed that your radio and checkbox groups aren’t structured properly. I noticed that in your code, you don’t keep the labels wrapped around the inputs that you have for them. Instead you you end them with breaks/< br>'s. fCC’s example:
I´ll check everything you comment. I just started some weeks ago to learn HTML and CSS. Actually, I know I haven´t finished to build the project, but I was wondering why it didn´t worked. At some point, I tried to wrap as labels before, but I guess I didn´t do it well. Still, I still have a lot to work on these page.