Deselect Radio Button if another one is selected - HTML CSS CSS Form

HTML CSS examples for CSS Form:input radio button

Description

Deselect Radio Button if another one is selected

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--   w ww .jav  a2 s  . c  om-->
 <body> 
  <form> 
   <div class="project"> 
    <ul class="choice"> 
     <li> <input type="radio" name="firstchoice" value="1" id="firstchoice_1_0"> <label for="firstchoice_1_0">First choice</label> </li> 
     <li> <input type="radio" name="secondchoice" value="1" id="secondchoice_1_1"> <label for="secondchoice_1_1">Second choice</label> </li> 
    </ul> 
   </div> 
   <div class="project"> 
    <ul class="choice"> 
     <li> <input type="radio" name="firstchoice" value="2" id="firstchoice_2_0"> <label for="firstchoice_2_0">First choice</label> </li> 
     <li> <input type="radio" name="secondchoice" value="2" id="secondchoice_2_1"> <label for="secondchoice_2_1">Second choice</label> </li> 
    </ul> 
   </div> 
  </form>  
 </body>
</html>

Related Tutorials