Hi, I would appreciate if someone can explain to me why my answer is mark as invalid. I have found an answer that works looking around in this forum, but just by comparing both answers I am not learning what is wrong with mine.
This is the error i get:
13. Inside the form element, I can select a field from one or more groups of radio buttons. Each group should be grouped using the name attribute. Each radio button must have a value attribute.
All your radio-buttons must have a value attribute : expected 3 to equal 2
AssertionError: All your radio-buttons must have a value attribute : expected 3 to equal 2
This is my code:
This is one of the answers which i found to work:
By comparing both answers, clearly the problem seems to reside in how I used the label tags. The thing is that I used one label for each radio button with matching id and for attribute values because that is what we are told to do in this challenge: https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/use-the-value-attribute-with-radio-buttons-and-checkboxes
What is the problem of doing it the way I did? I see what is wrong but i would like to understand why it is wrong.
Here is a link to my survey project in case you need it: https://codepen.io/Tomas_ep22/pen/oNLvKXQ?editors=1000