Radio Input Error [HTML] | SoloLearn: Learn to code for FREE!

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?

9/4/2018 4:55:57 PM

San Antonio🎧

3 Answers

New Answer

+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