for Radio Values in HTML (input type=”radio”)
Example : How to create radio button to select only one choice at a time in html.
<!doctype html>  
<html>	
   <head>
      <title>Codershelpline Code of Typical Html Page</title>
   </head>
	
   <body>
      <form name="form1" id="form2" action="#" method="post">
	 <center>
	    <fieldset style="width: 600px">				
		<legend>Create New Student Account</legend>
		   <table name="tab1" id="tab2">			   
		      <tr>
			  <td>Sex</td>
			  <td>:</td>
		          <td>
				<input type="radio" name="Rdbsex" id="RdbMale" value="Male">Male
				<input type="radio" name="Rdbsex" id="RdbFemale" value="Female">
                                       Female
				<input type="radio" name="Rdbsex" id="RdbOther" value="Other">Other
		          </td>
		      </tr> 
		      <tr>
			     <td></td>
			     <td></td>
			     <td><input type="submit" name="BtnSave1" id="BtnSave2" value="Save">
			     	 <input type="reset" name="BtnReset1" id="BtnReset2" value="Reset">                                 
			     </td>
		     </tr>
		   </table>
	       </fieldset>
            </center>
	 </form>
      </body>
  </html>
for Check Box Values in HTML (input type=”checkbox”)
Example : How to create check box to select none/multiple choice at a time in html.
<!doctype html>  
<html>	
   <head>
      <title>Codershelpline Code of Typical Html Page</title>
   </head>
	
   <body>
      <form name="form1" id="form2" action="#" method="post">
	 <center>
	    <fieldset style="width: 600px">				
		<legend>Create New Student Account</legend>
		   <table name="tab1" id="tab2">			   
		     <tr>
			     <td>Hobbies</td>
			     <td>:</td>
			     <td>
			   	<input type="checkbox" name="ChkCricket1" id="ChkCricket2" 
                                       value="Cricket">Cricket
			   	<input type="checkbox" name="ChkDance1" id="ChkDance2" 
                                       value="Dance">Dance
			   	<input type="checkbox" name="ChkMusic1" id="ChkMusic2" 
                                       value="Music">Music			   
			     </td>
		    </tr>			   
		    <tr>
			     <td></td>
			     <td></td>
			     <td><input type="submit" name="BtnSave1" id="BtnSave2" value="Save">
			     	 <input type="reset" name="BtnReset1" id="BtnReset2" value="Reset">                                 
			     </td>
		     </tr>
		   </table>
	       </fieldset>
            </center>
	 </form>
      </body>
  </html>

Loading

Categories: HTML

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.