Search code examples
htmlcssinputradio-button

My form radio buttons don't work


Some simple HTMl, I've added spans for styling, should I be using labels instead? It's meant to only allow one selected at a time. What am I doing wrong? I am codeblind :P

JSfiddle here.

Thanks.


Solution

  • A radio group is created by a having a number of radio buttons with the same name.

    You have a number of radio groups, each containing one button.

    You shouldn't add labels for styling, but you should add labels for associating the label of a radio button with the radio button.