Radio buttons- not providing value

Dear Coders,

I m currently finishing project 2 in HTML course. For task 13 and 14 (radio buttons), its been mentioned to give “value=Yes or Value=no”.

Here’s the link for it :-

Just out of my curiosity, while trying to code for radio buttons, I tried not to provide the “value=yes” in my Input element and check how does it get rendered on the webpage. To my suprise, it automatically takes the value as “ON” and same things happens if i dont provide "value=no"

Could some one please explain as why does it happen, even after i omit to provide the value in the code.

Your reply will be much appreciated.

Thanks in advance.
Harish Temker

Hello! I’m not entirely sure, but I would assume it has something to do with how the backend works, and which values you provide. ON maybe a default value.


on is indeed the default value for a radio button, if not otherwise specified.


Thank you Gentlemen. Appreciate your quick response

1 Like