0
Radio Input Error [HTML]
I created a radio with male and female values in HTML but the two radios check instead of one... Why? What is the solution?
3 Answers
+ 6
Anthony Umeh
<p>Choose sex</p>
<p>Man: <input type="radio" name="sex" />
<br />
Woman: <input type="radio" name="sex" />
</p>
check this code
+ 3
To answer the why part...
Giving both radio inputs the same value for the "name" property (as Niket demonstrated) tells the browser to treat them as part of the same group.
+ 1
Thanks